bellportal Posted October 30, 2003 Posted October 30, 2003 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 doesn't work! What do I need to change? Mike Quote
hog Posted October 30, 2003 Posted October 30, 2003 Someone correct me if I'm 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 haven't looked into this but there must be ready made classes provided by .NET to allow such programming Quote My website
Leaders dynamic_sysop Posted October 30, 2003 Leaders Posted October 30, 2003 there are many times you may still need to use Api's in .net , but providing help for disabling CTRL+ALT+DEL isn't really a policy of this forum ( things like that could be used for malicious purposes ) Quote
bellportal Posted October 31, 2003 Author Posted October 31, 2003 Oh. It is for a pass-protected screensaver... Quote
Administrators PlausiblyDamp Posted October 31, 2003 Administrators Posted October 31, 2003 Password protected screensavers don't 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). Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Administrators PlausiblyDamp Posted November 3, 2003 Administrators Posted November 3, 2003 very low level code. however a quiick search on google brought back this - may be of some use may not... http://www.codeguru.com/vb/comments/1170.shtml Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.