I have a vb.net form, and I would like to send keys to notepad. I can make notepad the active window, but the send keys command does nothing. Any help greatly appreciated. Please see code below.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetActiveWindow Lib "user32" Alias "SetActiveWindow" (ByVal hWnd As Long) As Long
Private Declare Function BringWindowToTop Lib "user32" Alias "BringWindowToTop" (ByVal hwnd As Long) As Long
'Make notepad the active window
Dim myTest As Long
myTest = WindowHandle("Untitled - Notepad")