| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual Basic 6.0 Programming Ask questions about VB 6.0 (or earlier versions) or help others by answering their question. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I need a code where it will disable the keyboard and the mouse i'm useing window's 98. please help me if you can
Last edited by New_Brink; April 27th, 2004 at 07:21 PM. |
|
#2
|
||||
|
||||
|
This should work in win98 (hope you have Se)
Code:
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub Form_Activate() 'KPD-Team 2000 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net DoEvents 'block the mouse and keyboard input BlockInput True 'wait 10 seconds before unblocking it Sleep 10000 'unblock the mouse and keyboard input BlockInput False End Sub
__________________
Rules in Codeguru Color code:Cimp Yves Simon666JeffBAio Code Job opportunities Do you sell? - not tested but could be interesting Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus. |
|
#3
|
||||
|
||||
|
thanks do you got a code that will disable "ctrl", "alt", "delete"? that would help alot and how can i change it to where it will enable after 60 seconds instead of 10? help me if you can thanks
|
|
#4
|
||||
|
||||
|
as far as I know, disable "ctrl", "alt", "delete" is not possible
under NT, win2k, winXp. abut 60 seconds: Code:
BlockInput True 'wait 60 seconds before unblocking it Sleep 60000 'unblock the mouse and keyboard input BlockInput False
__________________
Rules in Codeguru Color code:Cimp Yves Simon666JeffBAio Code Job opportunities Do you sell? - not tested but could be interesting Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus. |
|
#5
|
||||
|
||||
|
Is there a disable for "ctrl", "alt", "delete" for windows 98? thanks for your help
|
|
#6
|
||||
|
||||
|
Yes: tell os your program is a screensaver running
On win 98 you can:
Code:
Private Const SPI_SCREENSAVERRUNNING As Long = 97
Private Declare Function SystemParametersInfo Lib "User32.dll" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
'To disable:
'call it as
DisableEnable True
'To enable, call it as:
DisableEnable False
'remember to enable when quitting your program!
Private Sub DisableEnable(bParam As Boolean)
Dim lRetVal As Long, bOld As Boolean
lRetVal = SystemParametersInfo(SPI_SCREENSAVERRUNNING, bParam, bOld, 0&)
End Sub
Code:
Private Declare Function RegisterServiceProcess Lib "Kernel32.dll" _
(ByVal dwProcessId As Long, ByVal dwType As Long) As Long
Sub AltCtrlDel_Show()
Call RegisterServiceProcess(0, 0)
End Sub
Sub AltCtrlDel_Hide()
Call RegisterServiceProcess(0, 1)
End Sub
__________________
Rules in Codeguru Color code:Cimp Yves Simon666JeffBAio Code Job opportunities Do you sell? - not tested but could be interesting Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus. Last edited by Cimperiali; May 4th, 2004 at 05:40 AM. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|