Solved

catch keyboard in screen saver

Posted on 2003-11-09
1
161 Views
Last Modified: 2010-05-01
i wrote a screensaver in visual basic (with a password) and i have a problem in win 9X.
when the user presses the alt-tab or ctrl-esc it displays the desktop. i wish to catch that before windows and tell windows not to handle the keypress.
i am looking for a code that does that.
0
Comment
Question by:dvirw
1 Comment
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 250 total points
ID: 9710256
command1 will disable,command2 enable:

Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
    Private Const SPI_SCREENSAVERRUNNING = 97

Private Sub Command1_Click()
SystemParametersInfo SPI_SCREENSAVERRUNNING, True, False, 0
End Sub

Private Sub Command2_Click()
SystemParametersInfo SPI_SCREENSAVERRUNNING, False, False, 0
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now