|
-
Nov 2nd, 1999, 11:35 AM
#1
Thread Starter
Member
I'm writing a little program similar to "netnanny"
When the user surfs to a site like "http://www.xxx.com", how do I lock keyboard input so as to close the window?
-
Nov 2nd, 1999, 01:03 PM
#2
Hyperactive Member
'****** In a module:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_SCREENSAVERRUNNING = 97&
Public Sub DisableKeys(dKeys As Boolean)
Dim lReturn As Long
Dim bPre As Boolean
lReturn = SystemParametersInfo(SPI_SCREENSAVERRUNNING, dKeys, bPre, 0&)
End Sub
'************* Then on a form....
Private Sub Bad_Kitty_Click()
On Error Resume Next
If Command1.Caption = "Disable Keys" Then
DisableKeys True
Command1.Caption = "Enable Keys"
ElseIf Command1.Caption = "Enable Keys" Then
DisableKeys False
Command1.Caption = "Disable Keys"
Else
End
End If
End Sub
Hope this helps!
-
Nov 2nd, 1999, 04:06 PM
#3
Thread Starter
Member
It does block those special keys..
Now.. it would be great if mouse input could be blocked too
-
Nov 2nd, 1999, 04:33 PM
#4
Hyperactive Member
Note that that doesn't work in Win NT.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|