Autor Beitrag
Chris Maslowski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 109



BeitragVerfasst: So 20.03.05 19:51 
Hallo :D
Weiß zufällig jemand wie ich ein Formular auf "Visible.false" setzte :?: Ich hab schon im Objekt-Inspektor geguckt aber da ist das von vorneherein auf false. Das Programm soll so laufen das wenn man es startet ein Systray erzeugt wird und wenn man auf den Systray klickt öffnet das Programm erst richtig.

Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Di 22.03.2005 um 12:36
Moderiert von user profile iconTino: Titel geändert.
Diabele$
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 53



BeitragVerfasst: So 20.03.05 20:01 
?

Bei mir geht das, wenn man "Form1.Visible" auf false setzt, sieht man es nicht mehr, zumindest wenn man das im Quellcode macht.
Dort aber auch nicht bei einer FormCreate-procedure...

Soetwas geht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Visible:=false;
end;


Das Programm selbst läuft aber weiter.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: So 20.03.05 20:14 
Titel: Re: Unsichtbares Formular
Chris Maslowski hat folgendes geschrieben:
Weiß zufällig jemand wie ich ein Formular auf "Visible.false" setzte? Ich hab schon im Objekt-Inspektor geguckt aber da ist das von vorneherein auf false. Das Programm soll so laufen das wenn man es startet ein Systray erzeugt wird und wenn man auf den Systray klickt öffnet das Programm erst richtig.


In der Projektdatei (DPR):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.RES}

begin
  Application.ShowMainForm := False;
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.


Und dann Self.Visible := True; um das Fenster anzuzeigen.

_________________
Ciao, Sprint.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: So 20.03.05 20:16 
Versuchs mal, aber ich wette, es klappt nicht! ;)

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: So 20.03.05 20:28 
wulfskin hat folgendes geschrieben:
Versuchs mal, aber ich wette, es klappt nicht!

Warum sollte das nicht funktionieren?

_________________
Ciao, Sprint.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: So 20.03.05 20:30 
user profile iconSprint hat folgendes geschrieben:
Warum sollte das nicht funktionieren?
Naja, ich hatte bis jetzt immer Probleme mit der Funktion "Minimiert starten". Würde mich wundern, wenn er das so einfach hinbekommt. Aber mal sehen, vielleicht habe ich einfach was falsch gemacht.

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: So 20.03.05 20:35 
Minimiert starten ist aber nicht dasselbe. Wenn das Form nicht sichtbar ist, gibt's auch keinen Eintrag im der Taskleiste.
Übrigens: Application.ShowMainForm := False; kannst du auch im Form-Create drin haben (onCreate). Oder ganz unten in der Unit:
ausblenden Delphi-Quelltext
1:
2:
3:
initialization
 Application.ShowMainForm := False;
end.

Wo immer man es am besten sieht... In der Projektdatei ist es aber wahrscheinlich am übersichtlichsten. ?
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Mo 21.03.05 10:58 
Ich mache das immer mit "Form1.hide" zum unsíchtbar machen und "Form1.show" zum wieder sichbar machen. Das allerdings in Delphi3, hab also keine Ahnung wie das bei andreen Versionen ist.