谢谢

解决方案 »

  1.   

    win api :FINDWINDOWA,具体请见ONLINE help
      

  2.   

    h : DWord ;h := FindWindow(Pchar('TForm1'),Pchar('Caption')) ;
    if h = 0 then ShowMessage('no') ;
      

  3.   

    我只想知道abcd.exe是否正在运行,请问用什么语句?谢谢各位的帮助!!
      

  4.   

    var
      MutexHandle:Thandle;
    begin  Mutexhandle := Windows.CreateMutex(nil, true, 'abcd');  if Mutexhandle <> 0 then ShowMessage('Exists') ;
      

  5.   

    得到程序列表:
    uses tlhelp32;--------------
    var
    lppe:tprocessentry32;
    sshandle:thandle;
    found:boolean;
    begin
    sshandle:=createtoolhelp32snapshot(th32cs_snapail,0);
    found:=process32first(sshandle,lppe);
    while found do
    begin
      //进行你的处理其中lppe.szExefile就是程序名。
      found:=proccess32next(sshandle,lppe);
    end;
    end;//线程用Thread32First,Thread32Next
    //模块用Module32First,Module32Next
    //堆用Heap32First,Heap32Next
    //可执行文件用process32first然后在列表里找