Test if Delphi is running

zhaozj2021-02-11  209

Delphi detect whether running http://www.tommstudio.com (April 19, 2001) Author: Icebird (recommended) Recommended: Icebird

{Detection Delphi is running} function delphiisrunning: boolean; consta1: 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} BeginResult: = (FindWindow (A1, T1) <> 0) AND (FindWindow (A2, NIL) <> 0) AND (FindWindow (A3, NIL) <> 0) AND (FindWindow (A4, NIL) <> 0); end; {detection Delphi is running}

转载请注明原文地址:https://www.9cbs.com/read-3982.html

New Post(0)