-
Ok guys, here's my problem: I'm trying to set focus on some existing form (It already have some icon in the start menu bar...!) and bring it back to foreground while double-clicking on a tray icon. :confused: P.S: Don't tell me "use SetForegroundWindow", cause it don't works... In that case, the icon on the start menu bar only blink a few times, but form don't shows ;)
-
Under 98 and 2000 there are restrictions on which processes may bring a given window to the foreground. If a process can't do it, the target window's icon in the task bar is flashed.
Perhaps:
Platform SDK: Windows User Interface
OpenIcon
The OpenIcon function restores a minimized (iconic) window to its previous size and position; it then activates the window.
BOOL OpenIcon(
HWND hWnd // handle to window
);
Parameters
hWnd
[in] Handle to the window to be restored and activated.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
OpenIcon sends a WM_QUERYOPEN message to the given window.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Windows Overview, Window Functions, CloseWindow, IsIconic, ShowWindow
Built on Thursday, May 11, 2000Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Windows Overview, Window Functions, CloseWindow, IsIconic, ShowWindow
-
But... If ICQ... or simply the dialup connection icon (tray icon, when you're connected) can do it, why we can't? There's a way, for sure... I've tried witn OpenIcon but this function just do nothing... :(
-
That would indicate to me that the program is probably deliberately blocking the maximization, i.e., it makes itself iconic again unless it was reactivated the way it wants to be reactiviated (if at all).