Results 1 to 4 of 4

Thread: Emulate Left Mouse Button

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    2

    Unhappy

    This is for a school project. I'm building a program that receives a number from the serial port. If that number is number 4, for example, it simulates the left mouse button. So, if the mouse is over a command button, and the serial port receives the number 4, the command button will be selected (activated), as if it was clicked with the mouse. So far, all I can do is receiving that number from the serial port, through a microcontroller. The number is well sent to the PC, I've tested it. So far so good. What I can't do is simulating the mouse click, the left button. I've searched through Visual Basic 6.0 help, but can't figure out what to do! Should I use an API?? Can someone help me?? Thank you.

    P.S.: Here is my program. The toggle button is to open/close the serial port. I'm reading the buffer from the serial port in a text box (more simple). Then I compare it to number 4. If it's true, how do I simulate the mouse click?? It will help if someone knows how to simulate if number 4 is pressed from keyboard, for example. The objective is to simulate the left mouse button...without using the mouse!!
    Attached Files Attached Files

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