disabling screensaver

M

Martin

Does anyone know how I can disable the screensaver in my java program?

Thanks,

Martin
 
T

Tim Ward

Martin said:
Does anyone know how I can disable the screensaver in my java program?

I've not heard of a portable way of doing this.

On Windows for example you can prevent activation of the screen saver by
refraining from passing a WM_SYSCOMMAND message with the wParam parameter
set to the SC_SCREENSAVE value through to the DefWindowProc function, ie
when this message appears you just silently discard it.
 
M

Martin

Thanks for your fast reply, but I don't understand how I can refrain the
program from passing a WM_SYSCOMMAND message.

Could you explain it in java code?

Thanks,

Martin
 
T

Tim Ward

Martin said:
Thanks for your fast reply, but I don't understand how I can refrain the
program from passing a WM_SYSCOMMAND message.

Could you explain it in java code?

Haven't a clue, sorry. I would expect it can't be done at all in Java code -
if I were doing it I'd probably look into writing a Windows message hook in
a proper language, putting that into a DLL, and then working out how to
inject that into the JVM's process. However surely someone somewhere must
have already done this! - if you're really lucky you've now got enough
keywords to search for it.
 
A

AdT

It sometimes just happens.
I'm sure i've read this before in de.comp.lang.java - with the same
replies!!!

Und täglich güßt das Murmeltier / Groundhog Day!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Java Screensaver 0
Java Screensaver 0
Java Screensaver 0
Java Screensaver 0
Making a Screensaver with Java 3
Java Screensaver 0
Java Screensaver 0
Java Screensaver 0

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top