var win: longint; begin win := getforegroundwindow; //获取当前窗体的句柄 showwindow(win, SW_HIDE); //隐藏窗体 end;