General discussion

  • Creator
    Topic
  • #2083977

    end my VB program by mouse moving ?

    Locked

    by sabufaisal ·

    How can I end my VB program by any mouse moving ?

All Comments

  • Author
    Replies
    • #3780046

      end my VB program by mouse moving ?

      by lo ·

      In reply to end my VB program by mouse moving ?

      Been a bit, but … Not sure what the event is called, there is a ‘Mouse Over’ that triggers when the cursor ‘goes over’ a control. Various other events would detect mouse activity. Look in the properties of a controll, . . . B U T …

      Why would you want to do that. If you had it working (even on just some controlls), an ‘inadvertent crossing over’ or bump of a table would generate movement and trigger an end prograam. Depending on what/where/how, you may have a really ‘dissatisfied’user.

      What is the ‘real’ problem you are trying to solve? ‘If mouse movement = Yes then End Program’ is a solution, why does it exist in the code? Why not put an an Exit buttone, or some such? A timer? A message box that says ‘Do you want to Terminate?’ (that one will get old really fast also). lo

    • #3779968

      end my VB program by mouse moving ?

      by kirya ·

      In reply to end my VB program by mouse moving ?

      I don’t understand why do yuo need this but you can use this code:

      Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
      Unload Me
      End Sub

Viewing 1 reply thread