|
From: Leif M. <le...@ta...> - 2003-04-28 06:02:04
|
Bill,
The Window in the task bar is being displayed by the Java process so I
don't think there is anything that I can do about it from the Wrapper.
As a workaround though, have you tried playing around with adding a
WindowListener to your frame. If you simply do nothing in the
windowClosing method you should be able to prevent the user from
closing the window. As far as iconifying and maximizing the window.
It doesn't look like you can prevent the user from doing so, but there
are events that are fired that you can react to. If they iconify the
window
simply restore it. Same with maximizing the window. For the position,
you may need to have a thread which checks the position of the window
every 100ms or so and resets the position if it has changed.
All a bit hackish, but it should work for you. The only other idea
would
be to have a native DLL lookup the window handle using its exact name
and then modify its attributes from the Windows API. That sounds more
messy though...
Post back with the results of whatever you end up doing.
Cheers,
Leif
Bill Littman wrote:
>My project is an NT Service which uses Wrapper. It includes a JFrame
>which holds a display that monitors the status of the application, so
>there are no input controls on the JFrame. I perform a
>setUndecorated(true) on the JFrame to remove the entire title bar, so
>the user cannot move, resize, minimize, maximize, and most importantly,
>close the JFrame.
>
>Wrapper has allowed me to do a beautiful thing. When the computer is on
>but not logged in, the service runs fine. When the user logs in, up pops
>the JFrame monitor. Log in, log out, the application behaves
>beautifully. There is only one problem (okay, there are other problems,
>but not with anything to do with Wrapper!).
>
>The JFrame also deposits the usual task button on the task bar. If I
>right click on this button, I can close the JFrame (and minimize,
>maximize, and so forth). Is there any way to do either one of two
>things:
>1. Disable the right click menu for the task button (I would be happy if
>just the close were not enabled). Or,
>2. Allow the JFrame to come up without an associated task bar button.
>
>Thanks in advance for any help.
>
|