Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Disabling Windows95 keys 1997-08-12 -- Jeff Berlinghoff The call SystemParametersInfo(SPI_SCREENSAVERRUNNING,..)
on Win'95 disables ctrl+alt+del, ctrl+esc, the window key, and any other
'system' keys.
------- End Clip
Now's here's the function prototyped for Clarion:
MODULE('WinAPI')
COMPILE('***',_WIDTH32_)
SystemParametersInfo(UShort,UShort,*?,UShort),UShort,Pascal,Raw,|
Name('SystemParametersInfoA')
***
OMIT('***',_WIDTH32_)
SystemParametersInfo(UShort,UShort,*?,UShort),UShort,Pascal,Raw
***
END
Okay, Peter, from Windows notes, we know that SPI_SCREENSAVERRUNNING = 97
and you'll be interested in this too:
from UseNet Archives: --- Start Clip ---
It traps Ctrl-Alt-Del and others on Windows 95.
You can also try this to trick the system into thinking a screen-saver
is active (and therefore Ctrl-Alt-Del shouldn't work):
BOOL old;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0);
be sure to call
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0);
to turn it back on.
---- End Clip -----
More info from a Delphi FAQ --- Start clip----
[Q] Anyone know how to disable the CTRL-ALT-DEL option of Windows 95. I am
writing a screen saver in Delphi 1.0 and without this it makes the password
page useless.
[A] For Screensavers, use this to turn it off:
BOOL old;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0);
And this to turn it back on:
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0);
--- end Clip ---
Peter, I have never done this. But I have used the SystemParatemersInfo
function before, so I know the prototype works fine. Looking at both of
these examples, saying the same thing, I think you can be confident that
this is the way do do that. But if you just want to go with NT, be my
guest.
To have the app start automatically, couldn't you just put it in the Win95
startup group or place on the RUN= line of the Win.ini file?
Here's a little more on the subject
from UseNet Archives: --- Start Clip ---
It traps Ctrl-Alt-Del and others on Windows 95.
You can also try this to trick the system into thinking a screen-saver
is active (and therefore Ctrl-Alt-Del shouldn't work):
BOOL old;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0);
be sure to call
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0);
to turn it back on.
---- End Clip -----
More info from a Delphi FAQ --- Start clip----
[Q] Anyone know how to disable the CTRL-ALT-DEL option of Windows 95. I am
writing a screen saver in Delphi 1.0 and without this it makes the password
page useless.
[A] For Screensavers, use this to turn it off:
BOOL old;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0);
And this to turn it back on:
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0);
--- end Clip ---
Today is November 21, 2024, 3:34 am This article has been viewed 35194 times.
|
|