X
xgwzw
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormShow(Sender: TObject);
begin
MgrThread := TSvrManager.Create(True);
end;
//当我按下btn1后没有响应,怎么解决啊
procedure TForm1.btn1Click(Sender: TObject);
begin
PostThreadMessage(MgrThread.ThreadID, WM_QUIT, 0,0);
//MgrThread.WaitFor;
waitForSingleObject(MgrThread.Handle,Infinite);
MgrThread.Free;
MgrThread:= nil;
ShowMessage('finish!');
end;
begin
MgrThread := TSvrManager.Create(True);
end;
//当我按下btn1后没有响应,怎么解决啊
procedure TForm1.btn1Click(Sender: TObject);
begin
PostThreadMessage(MgrThread.ThreadID, WM_QUIT, 0,0);
//MgrThread.WaitFor;
waitForSingleObject(MgrThread.Handle,Infinite);
MgrThread.Free;
MgrThread:= nil;
ShowMessage('finish!');
end;