Can Java use Windows API? Has anyone changed screen resoultion in
Windows with a Java app or applet?
Thanks...
Well, you *could* use the Win32 API through an adapter layer written in
JNI... but if you've got Java 1.4 or better, just look into
java.awt.GraphicsDevice and its setDisplayMode method.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Is changing resolution really that difficult, you need to write
programs to do that?!
If you choose to support Microsoft's VM only (which is dead long ago),
then may be you can (I'm not sure what's in J++'s API). But you'll
probably have to sign the cab file for using such functionality.
Otherwise a Java application / signed applet can call a native program
via JNI to do the same.
To tell the truth, I don't want any program mess with my desktop (I
have placed my desktop icons manually. Changing resolution will most
likely rearrage them all). I'd also concern about security. I also
*hate* web pages that changes my browser windows' size. I view pages
my own way.
If you want to do that to your users, ask them first.
KC.
and "ChangeDisplaySettings":
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_7gz7.asp
I had a version of the display-settings a while back.
It is also possible to use .NET with embedded controls and P/Invoke to do the same thing.
- Michel Gallant
MVP Security
"Chris Smith" <cds...@twu.net> wrote in message news:MPG.1961383f5...@news.altopia.com...