首页 | 社区 | 博客 | 招聘 | 文章 | 新闻 | 下载 | 读书 | 代码
亲,您未登录哦! 登录 | 注册

检测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是否正在运行} 

本栏文章均来自于互联网,版权归原作者和各发布网站所有,本站收集这些文章仅供学习参考之用。任何人都不能将这些文章用于商业或者其他目的。( Pfan.cn )

编程爱好者论坛

本栏最新文章