include \masm32\include\windows.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc include \masm32\include\Comctl32.inc include \masm32\include\shell32.inc include \masm32\include\DIALOGS.INC include \masm32\macros\macros.asm include \masm32\macros\ucmacros.asm include \masm32\include\advapi32.inc
invoke SetForegroundWindow, hWnd invoke SetWindowPos,hWnd,HWND_TOP,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE
call GetForegroundWindow cmp eax,hWnd je good push eax invoke GetClassName,eax,offset buf,30 invoke lstrcmp,offset buf,chr$("#32770") pop ebx test eax,eax jne good mov taskman,ebx invoke ShowWindow,ebx,SW_HIDE good: