?
Solved

catch keyboard in screen saver

Posted on 2003-11-09
1
Medium Priority
?
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 750 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

719 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