Community discussion forum

Capturing the mouse click and the object clicked on

  • 1 year ago

    Hello, I have to write a program using Access and it uses Visual Basic. The form has over 60 text boxes that when clicked on, it just displays the current time. I would like to listen for the mouse click in general and where it clicks, find if an object is there and if the object name begins with txtTime enter in the time. The part I do not know is listening for the mouse click in general and knowing if an object is there. I know how to find the click coordinates and I know how to cycle through the control collection. However, I believe there is more to do to get the desired results. Also, i only know clicks for specific controls, i.e. forms, detail, boxes; I don't know for just general. Maybe it's a callback function, I do not know. Thank you for any help.

  • 1 year ago
    Hi, is it possible to use the MouseMove event of each Textbox ? If there is no specific control under the mouse pointer, you can try to use the MouseMove, MouseDown or MouseUp event of the underlying form. Regards, Zorro
  • 1 year ago
    If there is no specific control under the mouse pointer, you can try to use the MouseMove, MouseDown or MouseUp event of the underlying form.

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback