Link to home
Start Free TrialLog in
Avatar of TomazB
TomazBFlag for Slovenia

asked on

INCREDIBLE nobody knows?- How to show my app if screen saver is active

If screen saver is active and my app gets something trough serial port or some work in app is done, it should show itself. Is this so hard to achieve that nobody knows how? Anybody........
Avatar of edey
edey

Actually, I believe that it is "that hard" simply because windows doesn't bother to inform anybody (except the current app that it's about to start a ssaver. Given this i would just assum that there may _always_  be a ssaver running & try faking an event to close the ssaver.  Possibilities include sending your self a WM_KEYDOWN/WM_KEYUP combo, moving the mouse (mouse.cursorPos := point(some_x,some_y) etc. My personal bet would be to just move the mouse 5-10 pixels, enough to quit the saver, not enough to be really distracting if there isn't a ssaver currently running. BTW, I'm not sure (without checking the source) how moving the mouse that way is handled, but if the system is sufficiently conviced that the ssaver should die you could try doing the same thing with the mouse_event api.

GL
Mike
mouse_event and keybd_event works both to stop the screen saver, no problem. Doin the same thing...

Regards, Madshi.
Avatar of TomazB

ASKER

Metods like:
KeyBd_Event(VK_ESCape,0,0,0);  or
mouse_event(MOUSEEVENTF_MOVE, 10, 10, 0, 0);  doesn't work on my NT4 OS.
Am I doing something wrong?
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

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
Avatar of TomazB

ASKER

Madshi you are right.
Avatar of TomazB

ASKER

Thank's Madshi, at last someone who knows the answer that is realy worth of points.
Wow, thanx for the point boost...   :-)