Link to home
Start Free TrialLog in
Avatar of dapperry
dapperry

asked on

How to have Daisy Fuentes?

I've got this really cool and seductive picture of Daisy which I want to use for a wallpaper on my pc at work.  Unfortunately, people sometimes pop in to my cubicle, and they might not think my wallpaper is appropriate.  So...I want to write a little program /TSR for Win 95/NT.  The idea is that I could just quickly hit a hot key, say F12, and the wallpaper would change to something more acceptable (Although far more boring).  
     Can someone show me the code to change wallpapers, and how to get the program to run sort of like an NT service, but which would allow the quick hot key.  Maybe theres already a program to do this, so pointing me to that would be just as good.  I wish I could offer more points, but know that you will be helping many a man with this question!

:) dapperry
Avatar of dapperry
dapperry

ASKER

Oh yeah, if anyone wants the picture just leave your email address.

:) dapperry
ASKER CERTIFIED SOLUTION
Avatar of Erick37
Erick37
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will try to implement this code this afternoon, and will get back to you soon on how it works out.  Thanks.

:) dapperry
Ok, the code works great!  The only part of the question is how to make it work as a service, or hidden, or at least in the sys tray.  Let me know what the best thing to do here would be.  I think it would be great if it was hidden, but you could hit another hot key to bring up the form.  Then in the form you could choose the wallpapers to switch.  (In case I get any more sexy shots of Daisy!) Let me know, and thanks for your help thus far.

:) dapperry
The best option would be to make the program reside in the system tray.  You can have the program startup hidden or minimized in the tray.  To restore the program, use the tray icon.

Here is a MS article which shows how to put your program into the system tray:

http://support.microsoft.com/support/kb/articles/Q176/0/85.ASP
It works great.  Thanks a lot.  BTW, please check out my new question, or how to determine/remove a shortcut from the startup.

:) dapperry
Erick37,
      Just an update.  I completed my program.  It seems to work fine on Win 95, but the hot keys seem to have no effect in Win NT 4.  Any idea why?

:) dapperry
Here's what MS says about RegisterHotkey:

Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.

[check to make sure RegisterHotkey returns a nonzero number]

Remarks
....
RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.

[make sure F12 is not already a reserved hotkey]