Results 1 to 3 of 3

Thread: sendmessage api again

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    2
    How do I use the sendmessage api to send commands such as 'enter' or 'ctrl+s' to a program?

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Use keybd_event will do

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    or just use the Sendkeys function

    Code:
    Private Sub Command1_Click()
        SendKeys "{ENTER}"
    End Sub
    
    Private Sub Command2_Click()
        SendKeys "^s"
    End Sub
    
    
    'Code improved by vBulletin Tool (Save as...)

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