Discussion Locked

Visual Basic Question

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a project and form in vb that I made not visible. I set the On Mouse Down event to send a message via the msgbox.

I made this vb as an .exe and run it from the start button on the window. I don't see the message from on the on mouse downevent.

Does the Form neets to be visible for it to work or can it be invisible??? I want the run this vb.exe and detect a mouse down event?

Any suggestions?

Thanks,

Gary

9 replies

by j.a.lawrence

I don't think that approach is going to work. Best bet is look at intercepting the mousepress thru an API call in VB.

by r. a. caluste

mouse events take effect only after the control has focus. you CANNOT have focus when the form is not visible.

hope this helps.

by rrv

Invisible controls do not receive mousemove or any mouse events. So idea is ruled out. to achieve this in the form load event get the background color and set the form color as the background color.[you can even simulate a transparent form]. set thecontrol box as false for the form. so the form is visible but totally transparent. now you can do mouse move event...
All the best
RV

This discussion is closed to new replies.