程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> 檢測Delphi是否正在運行

檢測Delphi是否正在運行

編輯:Delphi
{檢測Delphi是否正在運行}
  function DelphiIsRunning: Boolean;
  const
  A1: array[0..12] of char = 'TApplication'#0;
  A2: array[0..15] of char = 'TAlignPalette'#0;
  A3: array[0..18] of char = 'TPropertyInspector'#0;
  A4: array[0..11] of char = 'TAppBuilder'#0;
  {$IFDEF WIN32}
  {$IFDEF VER130}
  T1: array[0..15] of char = 'Delphi 5'#0;
  {$ENDIF}
  {$IFDEF VER120}
  T1: array[0..15] of char = 'Delphi 4'#0;
  {$ENDIF}
  {$IFDEF VER100}
  T1: array[0..15] of char = 'Delphi 3'#0;
  {$ENDIF}
  {$IFDEF VER90}
  T1: array[0..15] of char = 'Delphi 2.0'#0;
  {$ENDIF}
  {$IFDEF VER93}
  T1: array[0..15] of char = 'C++Builder'#0;
  {$ENDIF}
  {$IFDEF VER110}
  T1: array[0..15] of char = 'C++Builder'#0;
  {$ENDIF}
  {$IFDEF VER125}
  T1: array[0..15] of char = 'C++Builder 4'#0;
  {$ENDIF}
  {$ELSE}
  T1: array[0..15] of char = 'Delphi'#0;
  {$ENDIF}
  begin
  Result := (FindWindow(A1,T1)<>0) and
  (FindWindow(A2,nil)<>0) and
  (FindWindow(A3,nil)<>0) and
  (FindWindow(A4,nil)<>0);
  end;
  {檢測Delphi是否正在運行}
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved