摘要: 许多时候我们希望程序只有一个实例在运行,而不是多个实例同时运行。 其实完成这一功能有很多种方法,我把自己知道的几种方法简单介绍一下。一 使用全局原子program Project1; uses windows, Forms, Dialogs, Unit1 in 'Unit1.pas' {Form1}; {$R *.res} const myatom='我的全局原子方法'; begin if GlobalFindAtom(myatom)=0 then begin GlobalAddAtom(myatom); Application.Initialize; Appl 阅读全文
posted @ 2012-08-22 18:16 马儿快跑 阅读(290) 评论(0) 推荐(0) 编辑