Per Parameter die Exe-Datei anweisen, dass das Fenster nicht geöffnet werden soll?
-
Entschuldige, dass ich erst so spät antworte.
Ich habe Deine Version übernommen und es funktioniert auch.
Allerdings flackert die Anwendung kurz auf und wird erst dann beendet.
Woran kann das liegen?
-
So jetzt flackert nichts mehr auf. Optional kannst Du auch Top und Left der Form auf -5000 setzen
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { try { ShowWindow(Application->Handle, SW_HIDE); Application->Initialize(); Application->ShowMainForm = false; Application->CreateForm(__classid(TForm1), &Form1); Application->Run(); ShowWindow(Application->Handle, SW_HIDE); } ...
-
Dank Dir für die Hilfe.
-
Gerne wieder.
-
Also, ich weiß nicht, was ihr da macht. Bei mir geht folgendes ohne Probleme:
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { try { if( ParamStr(1) != "-nowindow" ) { Application->Initialize(); Application->CreateForm(__classid(TForm1), &Form1); Application->Run(); } } catch (Exception &exception) { Application->ShowException(&exception); } return 0; }