|
#1
|
|||
|
|||
|
Lock mouse input
How can we lock mouse just for our application. I mean ... i dont want to lock mouse for the windows as "BlockInput" API does, i just want to block mouse input on my application for a specified time.
Regards |
|
#2
|
|||
|
|||
|
Set the Enabled property of the visible form(s) or controls to False.
__________________
Phil Weber http://www.philweber.com Please post questions to the forums, where others may benefit. I do not offer free assistance by e-mail. Thank you! |
|
#3
|
|||
|
|||
|
by setting Enabled=False, form is grayed out
|
|
#4
|
|||
|
|||
|
OK, how about simply ignoring any mouse clicks you receive?
__________________
Phil Weber http://www.philweber.com Please post questions to the forums, where others may benefit. I do not offer free assistance by e-mail. Thank you! |
|
#5
|
|||
|
|||
|
Yes, this is what i need, but how?? Do i need to capture the mouse events for controls, IMO this is not a good approach. What do you suggest?
Last edited by sequel; 06-23-2006 at 03:00 AM. |
|
#6
|
|||
|
|||
|
Code:
' Declare form-level 'ignore mouse' flag
' Set to True when you want to 'disable' the mouse
Private bIgnoreMouse As Boolean
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
' Check flag in all mouse-related event handlers
If Not bIgnoreMouse Then
' Handle mouse click
End If
End Sub
__________________
Phil Weber http://www.philweber.com Please post questions to the forums, where others may benefit. I do not offer free assistance by e-mail. Thank you! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can vb6 makes its control not response to mouse click and keyboard input? | halosome | VB Classic | 5 | 05-16-2006 07:20 AM |
| Capturing Mouse Movements outside of screen resolution | Chris Eastwood | VB Classic | 4 | 03-28-2002 02:26 PM |
| Mouse Movement Playback | Eugene | VB Classic | 4 | 12-19-2000 01:52 PM |
| Mouse Movement Playback | Eugene | VB Classic | 0 | 12-19-2000 12:13 PM |
| how to easily lock out the mouse clicks | Cindy Zhang | authorevents.appleman | 2 | 04-10-2000 04:28 PM |