系统的那个如果要自动关闭就要用到定时器,然后通过操作窗口句柄来关闭var h:HWND;h := FindWindow(nil, 'Internet Explorer 脚本错误'); if h>0 then begin PostMessage(h,WM_SYSCOMMAND, SC_CLOSE,0); end;也可以在网上找一些可自动关闭的对话框 http://www.360doc.com/content/12/1020/17/7662927_242624632.shtml