DECLARE INTEGER ShowWindow IN Win32API; INTEGER hwnd, INTEGER nCmdShow DECLARE SHORT IsIconic IN Win32API; INTEGER hwnd DECLARE SHORT SetForegroundWindow IN Win32API; INTEGER hWnd * lnhWnd is the window handle IF (IsIconic(lnhWnd) # 0) * 9 = SW_RESTORE * Restore the window = ShowWindow(lnhWnd, 9) ENDIF = SetForegroundWindow(lnhWnd)I think that I also saw a file in the download section that may do this automatically for you.