![]() |
Forms ausgeblendet starten ?
Hallo
ich möchte mein Program über einen Parameter mit einem Link (verknüpfung) alle Forms ausblenden Ich folgendes gemacht :
Delphi-Quellcode:
Ich habe einen Parameter "programhidden" erstellt
program Project1;
uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}; {$R *.res} procedure HideForms; begin Form1.Hide; Form2.Hide; end; begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); if Paramstr(1) = 'programhidden' then HideForms; Application.Run; end. end. Aufruf : "C:\Project1.exe" programhidden Aber das Programm startet trotzdem normal : ( _ |
Re: Forms ausgeblendet starten ?
Versuch es mal mit
Delphi-Quellcode:
Application.ShowMainForm := (ParamCount > 0) and (Paramstr(1) = 'programhidden');
|
Re: Forms ausgeblendet starten ?
Ein not fehlt noch, Deddy.
|
Re: Forms ausgeblendet starten ?
Tatsache! Also so (andersrum):
Delphi-Quellcode:
Application.ShowMainForm := not ((ParamCount > 0) and (Paramstr(1) = 'programhidden'));
|
Re: Forms ausgeblendet starten ?
Danke sehr : )
es hat trotzdem funktioniert ! :firejump:
Delphi-Quellcode:
{$R *.res}
procedure HideForms; begin // Form1.Hide; // Form2.Hide; Application.ShowMainForm := (ParamCount > 0) and (Paramstr(1) = 'programhidden'); end; // und so nicht : Application.ShowMainForm := not ((ParamCount > 0) and (Paramstr(1) = 'programhidden')); |
Re: Forms ausgeblendet starten ?
Das muss ich jetzt nicht verstehen :gruebel:
|
Re: Forms ausgeblendet starten ?
Ich auch nicht
Aber Es funktioniert mit dem 1. Code sehr gut |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz