打印本文 打印本文 关闭窗口 关闭窗口
报名机器人
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3692  更新时间:2009/4/23 18:34:21  文章录入:mintao  责任编辑:mintao
begin

//创建线程,同时线程函数被调用

  //messagebox(Handle,''''创建线程'''',nil,MB_OK);

  hthread:=CreateThread(nil,0,@ClosePopDialog,nil,0,ThreadID);

  if hThread=0 then

    messagebox(Handle,''''创建线程失败'''',nil,MB_OK);

end;

 

 

 

function ClosePopDialog(P:pointer):Longint;stdcall;

var

  i:longint;

  DC:HDC;

  kk:hwnd;

begin

 while (true) do

  begin

    if ((frmMain.stage = 3) )  then

    begin

        kk := findwindow(nil,''''Microsoft Internet Explorer'''');

        if kk<>0 then  //如果找到IE弹出对话框,就干掉它

        begin

            setActiveWindow(kk);

            sendmessage(kk,wm_close,0,0);

        end

    end;

    sleep(5000);

  end;

end;

 

 

 

图表 1 主界面

 

上一页  [1] [2] [3] [4] 

打印本文 打印本文 关闭窗口 关闭窗口