Groups > Borland > Borland Turbo C plus plus > Re: How can close my application? (newbies)




How can close my application? (newbies)

How can close my application? (newbies)
Sat, 21 Apr 2007 08:42:43 GMT
I have a form. Inside Form a Thread with recv(socket...:

void __fastcall MyClass::Execute()  // this is a thread, MyClass is
                                     // public TThread
while (!Terminate)
  recv(socket...buffer....)

I have thinks for close my application:
MyClass::CloseSocket();
MyClass::Terminate();
MyApplication::Terminate();

but this code dont close a form!
I have try also:
Form1->Close();
but it dont close!
Applicaton::Exit();
is not accepted!
My applicaton born with:
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1);
Application->Run();

Post Reply
Re: How can close my application? (newbies)
Sat, 21 Apr 2007 15:48:34 GMT
Ciccio ha scritto:
> CUT
> How I close it? Thanks ;-)
I have found!
I must first terminate the thread and after terminate the main application!
Post Reply
about | contact