Is there a command for left mouse button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Mann

    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


  • Smokey Joe

    #2
    Re: Is there a command for left mouse button

    The form has a click event.
    or maybe Screen.activeco ntrol might be helpful.

    Smokey
    On Mon, 04 Oct 2004 09:03:42 GMT, "Pete Mann"
    <petemann@bluey onder.co.uk> wrote:
    [color=blue]
    >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
    >[/color]

    Comment

    • Randy Birch

      #3
      Re: Is there a command for left mouse button

      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



      "Pete Mann" <petemann@bluey onder.co.uk> wrote in message
      news:Ol88d.2008 14$hZ3.96873@fe 2.news.blueyond er.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
      :
      :

      Comment

      Working...