Java class of Java Robot class in C #

Can someone help me convert the following Java code to C #.

Robot robot = new Robot(); robot.keyPress(KeyEvent.VK_WINDOWS); robot.keyPress(KeyEvent.VK_M); robot.keyRelease(KeyEvent.VK_WINDOWS); robot.keyRelease(KeyEvent.VK_M); 

I realized that we should use 'user32.dll'. But I'm not sure what methods we should name.

+7
source share
2 answers

If you are trying to simulate keystrokes, the following article will help you: http://www.codeproject.com/Articles/28064/Global-Mouse-and-Keyboard-Library

He has examples, so it should not be too hard to understand.

+7
source

The JAVA Robot class is designed for automatic testing and operates at or below the HAL level (equipment abstraction level). Simple programming of keys and mouse movements is not the same as putting keys in a hardware keyboard buffer or hardware mouse circuit.

0
source

All Articles