How can I send keys to inactive "ePSXe" window? [duplicate]

  • Thread starter AbdelAziz AbdelLatef
  • Start date
A

AbdelAziz AbdelLatef

Guest
This question already has an answer here:


I need to send a key to an inactive ePSXe window using C#. I got the handle of the window using Spy++, but when I used this code to send key "x", I got nothing. What should I do?

I tried different values of Msg as 0x0100, 0x0101 and 0x0102, but nothing worked. I also tried SendMessage and the results were the same.

[DllImport("user32.dll")]
public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
private void Send_X(IntPtr p)
{
PostMessage(p, 0x0100, (IntPtr)Keys.X, IntPtr.Zero);
}


I expect the window to respond to my key.

Continue reading...
 
Top