摘要:
procedure CloseGameSver();var H1, h2: HWND;begin H1 := FindWindow('TForm1', nil); h2 := FindWindowEx(H1, 0, 'ConsoleWindowClass', nil); // ShowMessage(Inttostr(h2)); SendMessage(h2, WM_CLOSE, 0, 0);end; 阅读全文
posted @ 2014-01-21 20:28
XE2011
阅读(244)
评论(0)
推荐(0)
摘要:
uses ShellApi;procedure TForm1.Button1Click(Sender: TObject);var filename, Path: string;begin filename := 'D:\WmgjServer146\server\start.bat'; Path := ExtractFilePath(filename); SetCurrentDir(Path); ShellExecute(Handle, 'open', PWideChar(filename), 'run', nil, SW_SHOWNORMAL); 阅读全文
posted @ 2014-01-21 15:13
XE2011
阅读(923)
评论(0)
推荐(0)

浙公网安备 33010602011771号