我这边是这样实现的,当启动监控的时候。启动监控代码 if (n17.Caption='启动监控(&W)') then begin WinExec('EnginWatch.exe -i',SW_SHOWNORMAL); n17.Caption:='停止监控(&W)' end else begin WinExec('EnginWatch.exe -t',SW_SHOWNORMAL); n17.Caption:='启动监控(&W)' end; 然后监控程序一直运行,当主程序退出,会发一个消息给监控程序,用socket通信,告诉它是否重新启动主程序 然后WinExec
我这边是这样实现的,当启动监控的时候。启动监控程序 if (n17.Caption='启动监控(&W)') then begin WinExec('EnginWatch.exe -i',SW_SHOWNORMAL); n17.Caption:='停止监控(&W)' end else begin WinExec('EnginWatch.exe -t',SW_SHOWNORMAL); n17.Caption:='启动监控(&W)' end; 然后监控程序一直运行,当主程序退出,会发一个消息给监控程序,用socket通信,告诉它是否重新启动主程序 然后WinExec 上面打错字了
if (n17.Caption='启动监控(&W)') then
begin
WinExec('EnginWatch.exe -i',SW_SHOWNORMAL);
n17.Caption:='停止监控(&W)'
end
else
begin
WinExec('EnginWatch.exe -t',SW_SHOWNORMAL);
n17.Caption:='启动监控(&W)'
end;
然后监控程序一直运行,当主程序退出,会发一个消息给监控程序,用socket通信,告诉它是否重新启动主程序
然后WinExec
if (n17.Caption='启动监控(&W)') then
begin
WinExec('EnginWatch.exe -i',SW_SHOWNORMAL);
n17.Caption:='停止监控(&W)'
end
else
begin
WinExec('EnginWatch.exe -t',SW_SHOWNORMAL);
n17.Caption:='启动监控(&W)'
end;
然后监控程序一直运行,当主程序退出,会发一个消息给监控程序,用socket通信,告诉它是否重新启动主程序
然后WinExec
上面打错字了