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;
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;