I'm developing my own onscreen keyboard using vb.net
I need a lower level keyboard, that can write in every process. write on a new notepad file i used this code:
Dim hwnd As IntPtr = FindWindow(Nothing, "Untitled - Notepad")
If Not hwnd = IntPtr.Zero Then
SetForegroundWindow(hwnd)
SetFocus(hwnd)
keybd_event(VK_RETURN, 0, 0, 0)
Thread.Sleep(100)
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0)
End If
But i need that this keyboard write in every kind of text editor and file name (not only in file "untitled - Notepad")
How can i focus on last process before geting focus on my form?
Thanks a lot