Autor Beitrag
DiamondDog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: So 25.05.08 12:08 
Hallo Leute,
also ich hab Folgendes Problem, ich bekomme es entweder nur hin das meine Form nicht mehr in der Taskleiste angezeigt wird oder das es keinen Rahmen mehr hat.
Ich würd es aber gerne so haben das es nicht in der Taskleiste angeziegt wird und der Rahmen auch weg ist. Das ganze ist für eine Popup die Form enthält ein Bild und nur das Bild soll angezeigt werden.

Ich hab es schon so probiert:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm2.FormShow(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
end;
aber leider hat das nicht funktioniert.
Hab auch schon im Forum gesucht aber nichts gefunden was funktioniert hat.
Hoffe ihr könnt mir da weiter Helfen.

Mfg Dog


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am So 25.05.2008 um 13:04
partybear23
Hält's aus hier
Beiträge: 11

Win XP Pro
D6, PHP5, Java
BeitragVerfasst: Mo 26.05.08 11:16 
Try this:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TMainForm.FormShow(Sender: TObject);
begin
  showwindow(getwindow(self.handle, gw_owner), sw_hide);
end;



Gruß

Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 11:28 
Das Funktioniert leider auch nicht.
partybear23
Hält's aus hier
Beiträge: 11

Win XP Pro
D6, PHP5, Java
BeitragVerfasst: Mo 26.05.08 11:44 
Hm also wenn ich in meinem Hauptformular nen 2. Form mache und das dann z.b mit Showmodal anzeige gibts keinen Eintrag in der Taskleiste,
ist es das was du meinst?

Vllt kannste mal deinen Code schicken, bin irgendwie ein wenig schwer von Begriff ;)


Gruß
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 11:56 
Also es soll kein Eintrag in der Takleiste sein und auch der Rahmen von Form 2 soll weg so das nur das image zu sehn ist.
Einloggen, um Attachments anzusehen!
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 26.05.08 12:01 
user profile iconDiamondDog hat folgendes geschrieben:
Also es soll kein Eintrag in der Takleiste sein und auch der Rahmen von Form 2 soll weg so das nur das image zu sehn ist.


Da hilft BorderStyle bsnone ;-)

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 12:02 
user profile iconZeitGeist87 hat folgendes geschrieben:
user profile iconDiamondDog hat folgendes geschrieben:
Also es soll kein Eintrag in der Takleiste sein und auch der Rahmen von Form 2 soll weg so das nur das image zu sehn ist.


Da hilft BorderStyle bsnone ;-)

Dann ist der Eintrag in der Taskleiste aber noch da.

Also die Form2 enthält ja ein Image und nur das soll zu sehn sein wenn Form 2 geladen wird.
Das heist kein Taskleisteneintrag und auch kein Rahmen von Form2.

Ps: Form2 = Popup
Einloggen, um Attachments anzusehen!
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 26.05.08 12:08 
Nun ja..leider kann ich nicht compilieren, weil ich die Unit Nx<irgendwas> nicht habe ;-)

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 12:11 
Ach ja hatte ich vergessen das ist hier zu bekommen:
Zum Download
Zur Not posten was geändert werden muss dann Teste ich das schnell.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 26.05.08 12:22 
Zum Ausblenden in der Taskbar:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.FormCreate(Sender: TObject);
begin
  ShowWindow( Application.Handle, SW_HIDE );
  SetWindowLong( Application.Handle, GWL_EXSTYLE,
                 GetWindowLong(Application.Handle, GWL_EXSTYLE) or
                 WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
  ShowWindow( Application.Handle, SW_SHOW );
end;



Zum nur Anzeigen des Bildes:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure anzeigen;
begin;
 form.borderstyle:= bsnone;

 //Ich zentrier das Fenster jetzt
 form.left:= round( (screen.width/2) - (form.width/2) );
 form.top:= round( (screen.height/2) - (form.height/2) );
end;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 12:45 
Ok hab das mal so gemacht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm2.FormShow(Sender: TObject);
begin
Form2.Left:=Screen.WorkAreaWidth-Form2.Width+Screen.WorkAreaLeft;
Form2.Top:=Screen.WorkAreaHeight-Form2.Height+Screen.WorkAreaTop;

//keinen Rahmen
Form2.borderstyle:= bsnone;
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  ShowWindow( Application.Handle, SW_HIDE );
  SetWindowLong( Application.Handle, GWL_EXSTYLE,
                 GetWindowLong(Application.Handle, GWL_EXSTYLE) or
                 WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
  ShowWindow( Application.Handle, SW_SHOW );
end;
Also wenn alles so ist dann ist der Rahmen zwar weg aber es ist immer noch in der Taskleiste.
Ps:
Geht ShowWindow( Application.Handle, SW_HIDE ); bei FormCreate überhaupt hab irgendwo gelesen das das nicht funktioniert.
partybear23
Hält's aus hier
Beiträge: 11

Win XP Pro
D6, PHP5, Java
BeitragVerfasst: Mo 26.05.08 12:48 
Joa dann könnteste noch das hier probieren:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
..
private
   { Private-Deklarationen }
   procedure CreateParams(var Params: TCreateParams); override; 
..

procedure TForm2.CreateParams(var params: TCreateParams);
begin
  inherited CreateParams(params);
  params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
  params.WndParent := GetDesktopwindow;
end;
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 13:00 
Ok hab die Procedure wieder entfernt:
ausblenden Delphi-Quelltext
1:
procedure TForm2.FormCreate(Sender: TObject);					

dafür die hier eingefügt:
ausblenden Delphi-Quelltext
1:
procedure TForm2.CreateParams(var params: TCreateParams);					

Das Hilft aber auch nicht der Rahmen ist weg aber es ist immer noch unten in der Taskleiste.
Hoffe das ihr noch ein Paar Tricks auf Lager habt.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 26.05.08 13:46 
Der Trick ist ganz einfach -.-

ist Form2 dein Hauptformular?
Nein, dann tu diesen Code einfach ins Hauptformular.

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 14:14 
Ok das hab ich Verstanden.
Habs so im Hauptformular eingefügt:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TfmBeeperOptions.FormCreate(Sender: TObject);
begin
[...]
begin
  ShowWindow( Application.Handle, SW_HIDE );
  SetWindowLong( Application.Handle, GWL_EXSTYLE,
                 GetWindowLong(Application.Handle, GWL_EXSTYLE) or
                 WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
  ShowWindow( Application.Handle, SW_SHOW );
end;
end;
das funktioniert nicht nur ich bin mir auch nit sicher ob das so richtig ist weil ja nirgendwo was von Form2 steht.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 26.05.08 14:15 
welches betriebssystem?

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mo 26.05.08 14:41 
Win XP
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Di 27.05.08 21:58 
Weiß den keiner mehr weiter, wie ich beides wegbekommen den Rahmen der Form und aus der Taskleiste?
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 28.05.08 09:48 
bei mir funktioniert das problemlos -.-

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Mi 28.05.08 09:57 
user profile iconZeitGeist87 hat folgendes geschrieben:
bei mir funktioniert das problemlos -.-

Ja wenn ich einfach mal zu testen ne Form1 erstelle gehts bei mir auch.
Nur wenn ich es in mein Programm einbaue dann geht das nicht :(
Die Hauptform ist ja die fmBeeperOptions da hab ich das bei FormCreate eingefügt nur tozdem sind beiden Formen noch in der Taskleiste zu sehn.