如何判断程序是否运行?很急,用DELPHI判断程序是否运行?没运行则启动它
解决方案 »
- 送分!求一下两个时间相减的方法?
- UDP如果服务器有防火墙,有什么办法可以让客户端连上去.
- 急用!!!
- for i=1 to 100 do 每次i的值都加1,怎么让它的步和为2,也就是让i每次增加2
- FastReport分栏问题?
- Ladies and gentlemen: 谁用过TMs Async32控件包(串口开发)中的VaTernimal控件啊!帮忙啊!
- Delphi中报错listindex out of bounds(7)
- 我刚辞了工作。心理比较难过。请各位指点一下?谢谢!
- delphi里有没有c中的静态变量?
- 一个报表的困惑
- 菜鸟请教:如果客户端必须等待seversocket返回结果后才可以做下一步的操作是否应该选择stThreadBlocking方式?
- 请教在自定义函数中同步调用TClientSocket的OnRead事件
http://community.csdn.net/Expert/topic/3633/3633504.xml?temp=.1247827
Application.Title := 'lch';
h:=::FindWindow(0,oldname);//oldename是Application->Title
if (h<>nil)then
begin
ShowMessage("it has run!");
Application.Terminate();
return 0;
end;
mHandle, fHandle: THandle;
begin
Application.Initialize;
mHandle := Windows.CreateMutex(nil, true, 'SendMessage');//SendMessage
if mHandle <> 0 then
begin
if GetLastError = ERROR_ALREADY_EXISTS then
begin
fHandle := FindWindow(PChar( 'Tfrom1'), nil);
if (fHandle>0) then
begin
ShowMessage("it has run!");
SetForeGroundWindow(fHandle);
Windows.ReleaseMutex(mHandle);
end;
Halt;
end;
end;