Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Lock & Unlock


Message #1 by "Rangarajhs" <sumantaj@s...> on Thu, 25 Apr 2002 08:55:53
Try this

Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long)
As Long
Private tim As Long

Private Sub Command1_Click()
    tim =3D 0
    Timer1.Enabled =3D True
    BlockInput True
End Sub

Private Sub Timer1_Timer()
tim =3D tim + 1
Me.Caption =3D 10 - tim & " Seconds for Unblock the input"
If tim =3D 10 Then BlockInput False: Timer1.Enabled =3D False: 
Me.Caption =3D
" Mouse and keyboard Unblok"
End Sub

Joe Conaty
Nations Direct IS Dept
(xxx) xxx-xxxx  Ext 221


-----Original Message-----
From: Rangarajhs [mailto:sumantaj@s...]
Sent: Monday, April 29, 2002 5:39 PM
To: professional vb
Subject: [pro_vb] Re: Lock & Unlock


Hi Desmond,
Thanks very much. If you don't mind can you
please send me the vb code to disable and
enable the keyboard. Do you think that the
same EnableHardware API call helps to enable
and disable mouse also?

Thanks
Rangaraj

> I have done this before check out the EnableHardware API call. It
takes
an
Int 0 =3D enable 1 =3D disable.
CAUTION If you dont enable the mardware
in your program you will have to re-boot.
----- Original Message -----
From: "Rangarajhs" <sumantaj@s...>
To: "professional vb" <pro_vb@p...>
Sent: Thursday, April 25, 2002 8:55 AM
Subject: [pro_vb] Lock & Unlock


> Can anyone please help me with vb code
> for Lock and Unlock mechanism for
> a Mouse as well as an entire keyboard.
>
> Rangaraj
> email:sumantaj@s...
>

  Return to Index