Solved

stoping screensaver by code

Posted on 2001-07-30
10
185 Views
Last Modified: 2010-04-06
Hi,

i need (if possible) a way (maybe an api call?) to stop the running screensaver and then run another totally different screen saver. what i mean is i would like to finish or terminate the current screensaver and run another with out having to set it as the default screensaver (passing scr_name parameters?)


any ideas?

thakns!
0
Comment
Question by:urif
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6333786
Assuming that the running screen saver does not ask for password etc you should be able to simply post a key.
Use keybd_event() to post a Shift key down and Shift key up.

Starting the new screen saver should work by simply executing it like any other exe.
0
 

Author Comment

by:urif
ID: 6333802
that's the thing, i did this before (the key down/up message) but then th OS welcomed me with a "enter the password" dialog...

now i solved this by disabling momentarily the password in the registry and then enabling it again (if it was enabled) but then somehow both screensavers ran at the same time and they overlapped!

any ideas?
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6333851
how did you run the screensavers?
0
 

Author Comment

by:urif
ID: 6333908
just by running then as normal exes, shellexecute.
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6334549
listening...
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Accepted Solution

by:
h_mohsenian earned 50 total points
ID: 6334580
if u run it by shellexecute you can terminate it by TerminateProcess ( API function ) or an API like this.

best regards
hamed
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6336358
Yup, that was what I was about to say too, Hamed :)

0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6336710
sorry,DragonSlayer ;-)
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6336713
sorry,DragonSlayer ;-)
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6339772
Next time... hehehhe :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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