Guidance
指路人
g.yi.org
software / rapidq / Examples / Devices / keyboard / Disable Task Manager.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'日期: Thu, 04 Jul 2002 20:57:15 -0000

'主题: [rapidq] CTRL+ALT+DELETE Knocked out cold!! 1er...2er...3er....

' John White (danilo_yoingco@yahoo.co.uk)

' Disable/Enable CTRL+ALT+DELETE. This code disables the Task Dialog
' aswell (the pop-up "close program" window) so no one can see your
' program in the Task List. It works by tricking Windows98 SE into
' thinking the ScreenSaver is running!!
'
' Note: Not tested to see what happens if you have no screensaver
'       or what happens if a screensaver comes on (does the screensaver
'       knockout this function and enable CTRL+ALT+DELETE again??).
'       Suppose you`d better get testing then.......!!
'
' Disadvantage: If another program crashes you will not be able to clear
'               it from the Task List, as the Task Dialog is disabled!!

     $OPTIMIZE ON
     $APPTYPE GUI
     $TYPECHECK ON

     CONST SPI_SCREENSAVERRUNNING=97
     CONST DISABLE=1
     CONST ENABLE=0

     DECLARE FUNCTION SystemParametersInfo LIB "user32.dll" _
      ALIAS "SystemParametersInfoA" (action AS LONG, param1 AS LONG, param2 _
      AS LONG, winIni AS LONG) AS LONG
     DIM rtn AS LONG, rtnval AS LONG

' On first running this code Rtnval tells of the previous state
' (not the current state) of the ScreenSaver Mode (Off or On). Running
' the code twice, on the same mode, updates Rtnval to the current state.
' Just ignore the above said if you are only using this code to disable
' (or enable) CTRL+ALT+DELETE.
     rtnval=0

'rtn=SystemParametersInfo(SPI_SCREENSAVERRUNNING, DISABLE, VarPtr (rtnval), 0)
     rtn=SystemParametersInfo(SPI_SCREENSAVERRUNNING, ENABLE, VARPTR (rtnval), 0)
     IF rtn<>0 THEN

     END IF
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2023-2-9  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-07-05 21:33:44