469,621 Members | 1,871 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

Is there a command for left mouse button

Hi
Could anyone tell me if there is a command which will recongnise a simple
mouse click anywhere on the screen, I can do it ok for a command box etc etc
but would like to be able to simply click a mouse button from anywhere on
the screen.
Thanking You In Advanced
Pete
Jul 17 '05 #1
2 3627
The form has a click event.
or maybe Screen.activecontrol might be helpful.

Smokey
On Mon, 04 Oct 2004 09:03:42 GMT, "Pete Mann"
<pe******@blueyonder.co.uk> wrote:
Hi
Could anyone tell me if there is a command which will recongnise a simple
mouse click anywhere on the screen, I can do it ok for a command box etc etc
but would like to be able to simply click a mouse button from anywhere on
the screen.
Thanking You In Advanced
Pete


Jul 17 '05 #2
If you call the SetCapture API prior to your mouse leaving the form, any
subsequent mouse input will be directed to the form, not to the application
you click. By testing the screen coordinates of the rodent in relation to
the form you can determine if the click occurred outside the form's client
area. Be sure to call ReleaseCapture when you're done to restore normal
mouse action.

--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Pete Mann" <pe******@blueyonder.co.uk> wrote in message
news:Ol********************@fe2.news.blueyonder.co .uk...
: Hi
: Could anyone tell me if there is a command which will recongnise a simple
: mouse click anywhere on the screen, I can do it ok for a command box etc
etc
: but would like to be able to simply click a mouse button from anywhere on
: the screen.
: Thanking You In Advanced
: Pete
:
:

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lakshmi Narayanan | last post: by
3 posts views Thread by mitsura | last post: by
reply views Thread by Chas Large | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.