There is the following code:

InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_F5); InputSimulator.SimulateKeyPress(VirtualKeyCode.DOWN); 

There are no problems with the second line, if you leave it alone, then everything is done well. But the first compiler complains, says they say there is no VK_F5, how can this problem be solved? Grateful for the help.

  • As an option - Find "c # VirtualKeyCode" for example, msdn.microsoft.com/en-us/library/windows/desktop/… and directly put 0x74 (VK_F5). Maybe the library is not the same? - nick_n_a 2:51
  • I tried it directly, maybe I didn’t do it right: InputSimulator.SimulateKeyPress (VirtualKeyCode.0x74); Library: using WindowsInput; - J.Do 2:53
  • No, or so InputSimulator.SimulateKeyPress(0x74) if it swears then InputSimulator.SimulateKeyPress((WORD)0x74) did not work with this library. If it does not work, then unsubscribe others will prompt. - nick_n_a 2:55
  • In both cases does not work. In the first: cannot convert from 'int' to 'WindowsInput.VirtualKeyCode' In the second one does not find the WORD - J.Do
  • one
    I solved the problem by the fact that instead of VK_F5, you just need to write F5, although it is written in the mane that VK_F5 seems to be strange. In any case, thanks for all the help. - J.Do

0