Always on top [message #436567] |
Wed, 19 May 2004 11:21  |
Eclipse User |
|
|
|
I am writing a Rich Client Platform application.
Is there any way to make set the application to be "always on top"?
Thanks,
Mark
|
|
|
|
|
|
|
|
|
Re: Always on top [message #436803 is a reply to message #436793] |
Mon, 24 May 2004 12:35   |
Eclipse User |
|
|
|
Mark Victory wrote:
> Thanks David,
>
> Do you know if there is a way other than via the constructor to set the
> shell to be always on top.
> I need to be able to transition my application into and out of the always on
> top state based on user actions.
>
> Thanks again,
> Mark
>
You can try shell.setActive()/shell.forceActive();
If you want to set it's state to be permanently ontop after it has been
constructed otherwise, you can do some native stuff to do it, but it
will only work on Windows. There might be another way, but I don't know
of it. Let me know if you have any more questions about this as I've
experimented with it a lot.
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos(shell.handle, OS.HWND_TOPMOST, 0, 0, 0, 0,flags);
David
|
|
|
|
Re: Always on top [message #446393 is a reply to message #444960] |
Wed, 24 November 2004 07:55  |
Eclipse User |
|
|
|
You have to bitwise OR the styles you want together:
Shell shell = new Shell(display,SWT.ON_TOP | SWT.MAX | SWT.MIN | SWT.CLOSE);
look at the Styles list in:
" http://download.eclipse.org/downloads/documentation/2.0/html /plugins/org.ec
lipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets /Shell.html "
Jayshan.
"Andre Harry" <andre.harry@motoring4.co.uk> wrote in message
news:clam88$j0h$1@eclipse.org...
> When i tried to use SWT.ON_TOP
>
> Somehow all the window decorations (border, title, etc) are gone
> Then i tried to add them by using SWT.SHELL_TRIM somehow it only dislay
> the border, title, and close button. I cant seem to get the
> MINIMIZE/MAXIMIZE buttons to be there
>
> Anyone can help?
>
> Thanks,
> Andre
>
> sundragon wrote:
> > thanks
> > "David Thomson" <david@suprasphere.com>
??????:c8j5el$7it$1@eclipse.org...
> >
> >>Heitzso wrote:
> >>
> >>
> >>>This is a variation of my question, which was how do you
> >>>force display order (the display stack) within the app.
> >>>If you find out an answer outside of the newsgroup
> >>>please post it back into the news group so I can pick
> >>>it up. Thanks
> >>>
> >>>
> >>>>I am writing a Rich Client Platform application.
> >>>>Is there any way to make set the application to be "always on top"?
> >>>
> >>>>Thanks,
> >>>>Mark
> >>
> >>Shell shell = new Shell(display,SWT.ON_TOP);
> >>
> >
> >
> >
> >
> >
> >
>
|
|
|
Powered by
FUDForum. Page generated in 0.05891 seconds