how to make keyboard & mouse temporary not response

  • Thread starter Thread starter cc
  • Start date Start date
Pardon me but the desktop responds to the I.O devices not the other way
around. Please explain what you are trying to do.

Regards - OHM
 
Hi,
how do I make keyboard & mouse temporary not response to desktop

I did want to answer with simple" me.enabled = false", but did not trust it
because this answer seems to simple to me. So I did test it, and I find
this strange and do not understand it.

Who will test it also and tell me if this is normal behaviour or a bug?
The problem is that when you pusth the button when enabled is false, it
keeps responding to the events, so you have to push several times on the not
locked button.

Framework 1.1

Cor

\\\
' needs one button and one label on a form
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Static i As Integer
Me.Button1.Text = "locked"
Dim ctr As Control
' Me.Enabled = false did not work so
'I did try this but does not work either
For Each ctr In Me.Controls
ctr.Enabled = False
Next
Me.Refresh()
Dim y As Integer
For y = 1 To 20
Threading.Thread.Sleep(50)
i = i + 50
Me.Label1.Text = i.ToString
Me.Refresh()
Next
For Each ctr In Me.Controls
ctr.Enabled = True
Next
Me.Button1.Text = "Unlocked"
End Sub
///
 
* "cc said:
how do I make keyboard & mouse temporary not response to desktop

\\\
Private Declare Auto Function BlockInput Lib "user32.dll" ( _
ByVal fBlock As Boolean _
) As Boolean
///
 
Back
Top