SCREENSAVER_RUNNING help... please!

bellportal

Member
Joined
Oct 30, 2003
Messages
5
Hi,

I have migrated from Win ME into Win XP (therefore VS 6 to VS.NET 2003 Pro.) and need some help. I only have knowledge in VB and nothing else - please help!

For a screensaver programme in VS 6, I had the following:


Public Const SPI_SCREENSAVERRUNNING = 97

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
-------------------------------------------------------
ENABLE/DISABLE CODE
-------------------------------------------------------
ENABLE:
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, lPrev, 0)
DISABLE:
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, lPrev, 0)


In Win ME, the enable and disable code worked fine - keys like CTRL+ALT+DEL were blocked out, however, in XP, the code doesnt work! What do I need to change?


Mike
 
Someone correct me if Im wrong but you should not be using an API call in .NET. You should use the Framework to provide you with what you want.

I havent looked into this but there must be ready made classes provided by .NET to allow such programming
 
there are many times you may still need to use Apis in .net , but providing help for disabling CTRL+ALT+DEL isnt really a policy of this forum ( things like that could be used for malicious purposes )
 
Password protected screensavers dont really work under XP (or any NT based OS) - when the screensaver kicks in it simply locks the workstation - they will just need to provide their name and password to unlock.

Not sure if you can intercept CTRL+ALT+DEL under NT anyway (or at least not without creating very low level kernel handlers).
 
Back
Top