Close() wird schon wieder nicht ausgeführt
-
Hallo,
beim letzten mal hatte ich Close im Konstruktor von Form1 ausgeführt was nicht Funktioniert.
Nun führe ich Close() in FormCreate aus, aber es funktioniert immer noch
nicht.void __fastcall TForm1::FormCreate(TObject *Sender) { rs232 *com1 = new rs232; com1->baudrate = 56000; com1->comport = "com1"; if(!(com1->init_rs232())) { Application->MessageBox("RS232 Port is already used"," ",MB_OK | MB_ICONERROR); // Ist com1 schon belegt Close(); // dann Meldung ausgeben und Close(); } }
-
Hallo
aus ca. demselben Grund funktioniert es auch hier nicht
Abhilfe (nicht besonderst gut ) Timer
MfG
Klaus
-
Hallo Klaus,
dann benutze ich Application->Terminate().
-
Warum der neue Thread? Befolge doch einfach die Empfehlungen bzgl. deiner ursprünglichen Frage, und, wenn du damit nicht klar kommst, stelle dort eine entsprechhende Nachfrage.