when the icon is in the system tray and i double click it the window appears but its not active. how would i implement this? thank ya for your time smurf
Posted on 2001-03-25 10:29:00 by smurf
You mean to set it active? Use this: invoke BringWindowToTop,hWnd invoke SetForegroundWindow,hWnd Jimmy
Posted on 2001-03-25 10:48:00 by JimmyClif
maybe im not using your method correctly. now the window appears to be the active one but only in the taskbar(its pressed down). the window doesnt even show up until i click on it in the taskbar. this is what i have .ELSEIF uMsg==WM_SIZE ;VVVVVVV systemtray .if wParam==SIZE_MINIMIZED mov note.cbSize,sizeof NOTIFYICONDATA push hWnd pop note.hwnd mov note.uID,IDI_TRAY mov note.uFlags,NIF_ICON+NIF_MESSAGE+NIF_TIP mov note.uCallbackMessage,WM_SHELLNOTIFY invoke LoadIcon,hInstance,IDM_N mov note.hIcon,eax invoke lstrcpy,addr note.szTip,addr iconTrayText invoke ShowWindow,hWnd,SW_HIDE invoke Shell_NotifyIcon,NIM_ADD,addr note .endif .ELSEIF uMsg==WM_COMMAND .if lParam==0 invoke Shell_NotifyIcon,NIM_DELETE,addr note mov eax,wParam .if ax==IDM_RESTORE invoke ShowWindow, hWnd,SW_SHOW invoke BringWindowToTop,hWnd invoke SetForegroundWindow,hWnd .else invoke DestroyWindow,hWnd .endif .endif
Posted on 2001-03-25 12:39:00 by smurf
That's because your window is still minimized. Replace your

invoke ShowWindow,hWnd,SW_SHOW	Activates the window and displays it in its current size and position. 


invoke ShowWindow,hWnd,SW_RESTORE	Activates and displays the 
window. If the window is minimized or maximized, Windows 
restores it to its original size and position. An 
application should specify this flag when restoring a 
minimized window.

Then you don't need the BringWindowToTop & the SetForegroundWindow anymore. This message was edited by JimmyClif, on 3/25/2001 1:49:24 PM
Posted on 2001-03-25 12:46:00 by JimmyClif
thank you for your time that did the trick smurf
Posted on 2001-03-25 12:49:00 by smurf