Results 1 to 6 of 6

Thread: VB.NET SendMessage() KeyStrokes.

Threaded View

  1. #1

    Thread Starter
    Banned
    Join Date
    Jun 2014
    Location
    https://t.me/pump_upp
    Posts
    41

    Exclamation VB.NET SendMessage() KeyStrokes.

    Hi,

    I have opened the NotePad and I want to send key strokes using SendMessage. I have got parent and child window and tried to send keystrokes using SendMessage() but didn't work. Why ? As far as I know the code is correct.

    PHP Code:
     Const WM_KEYDOWN As Integer = &H100
            
    Const WM_KEYUP As Int32 = &H101
            
    Const VK_RETURN As Integer = &HD

            Dim hWnd_notepad 
    As IntPtr FindWindow(Nothing"Untitled - Notepad")
            
    Dim hWnd_notepad_class As IntPtr FindWindowEx(hWnd_notepadNothing"Edit"Nothing)


            
    SendMessage(hWnd_notepad_classWM_KEYDOWNVK_RETURN0)
            
    SendMessage(hWnd_notepad_classWM_KEYUPVK_RETURN0
    Any help would be appreciated.
    Thanks!
    Last edited by abhishek009; Aug 30th, 2016 at 01:45 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width