|
-
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!
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
|