WEB开发网
开发学院软件开发Delphi 检测Delphi是否正在运行 阅读

检测Delphi是否正在运行

 2006-02-04 13:27:31 来源:WEB开发网   
核心提示:{检测Delphi是否正在运行}function DelphiIsRunning: Boolean;constA1: array[0..12] of char = 'Tapplication'#0;A2: array[0..15] of char = 'TAlignPalette'#0;
{检测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是否正在运行}

Tags:检测 Delphi 是否

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接