[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Force Shell Focus

Hi, everybody!
I'm working on an application which can be called by other apps. When it is the case, my Eclipse application should take the focus and appear on top of the other windows. I'm working under Windows XP SP2.
I've tried this:
==================
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
Shell shell = activeWorkbenchWindow.getShell();
shell.forceActive();
}
});
==================
But the taskbar only flashes and tells me that something happened in my application. It does not come back in front of windows.
Does anyone have any idea???
Thanks in advance!