Delphi-PRAXiS
Seite 2 von 3     12 3      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi MainForm minimieren - UnterForm sichtbar (https://www.delphipraxis.net/206-mainform-minimieren-unterform-sichtbar.html)

Yheeky 20. Jun 2002 18:20

@Mr.Spock: Also ich habe es so komischerweise nicht hinbekommen, aber wenn du sagst, dass der Code geht, scheine ich da noch irgendwas falsch zu machen.

@Toms: Funzt einwandfrei! Danke!

@All: Trotzdem danke für eure Bemühungen!

Gruß Yheeky

Nachtrag: Eine Frage hätte ich noch: Wie kann ich den Eintrag in der Taskbar verstecken? Ich denke mal, dass das möglich ist, oder?

MathiasSimmack 20. Jun 2002 19:07

So z.B.
Code:
ShowWindow(Application.Handle,SW_HIDE);
Oder, wie Luckie sagen würde: Stil auf "bsToolWindow" einstellen.
Code:
SetWindowLong(Application.Handle,
  GWL_EXSTYLE,
  GetWindowLong(Application.Handle,GWL_EXSTYLE) or
    WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);

Yheeky 20. Jun 2002 19:59

Sorry, falsch ausgedrückt :o
Ich möchte den Taskbareintrag von der Form2 ausblenden, nicht von der Application allgemein.

Gruß Yheeky

MathiasSimmack 21. Jun 2002 10:52

:idea: ... Achtung, Ironie! - Wenn ich ein Programmierer wäre, dann würde ich testen, ob die Änderung von "Application.Handle" in "Form2.Handle" was bringt ... :idea:

Yheeky 21. Jun 2002 12:10

Witzbold...*applaus* geht natürlich net...hab das natürlich als erstes getestet, ging aber nicht. Er hat die Form dann garnicht mehr angezeigt...

Ich hoffe mir kann noch jemand helfen, von - Entschuldigung - "dummen" Kommentaren kann ich mir nichts kaufen. Sorry @MathiasSimmack, aber das hätte man auch anders formulieren können.

Gruß Yheeky

toms 21. Jun 2002 12:21

Zitat:

@Toms: Funzt einwandfrei! Danke!

+

Zitat:

Ich hoffe mir kann noch jemand helfen
= ?

MathiasSimmack 21. Jun 2002 12:27

@Yheeky:

Da du offenbar die CreateParams-Methode von toms benutzt, zitiere ich an der Stelle einfach mal das PSDK:
Zitat:

WS_EX_APPWINDOW
Forces a top-level window onto the taskbar when the window is visible.
Ich denke, dies dürfte dein Ansatzpunkt sein.

------------

Nachtrag: Außerdem gibt´s in deiner ganzen Idee (vielleicht) einen Widerspruch. Ist die Form2 ein Dialog? Ein Toolwindow? Oder ist sie ein ganz normales Fenster mit den Buttons Minimieren, Maximieren. Dann wär´s interessant zu erfahren, wie der User die minimierte Form wieder erscheinen lassen soll, wenn du ihm keinen Knopf in der Taskbar zugestehst?

Yheeky 21. Jun 2002 14:37

Yo, ist ein Ansatzpunkt. Steht da auch im PSDK wie man den Eintrag in der Taskleiste verbergen kann?

@Toms: Die Frage hat sich auf meinen Nachtrag - ein paar Postings vorher - bezogen...

Gruß Yheeky

Luckie 21. Jun 2002 14:47

ToolWindows haben keinen Button in der Taskleiste.

MathiasSimmack 21. Jun 2002 15:59

Zitat:

Zitat von Yheeky
Steht da auch im PSDK wie man den Eintrag in der Taskleiste verbergen kann?

Ich bin mir ziemlich sicher, dass sich derartige Informationen im PSDK befinden. Und damit du nicht wieder sagst, dass du dir von -Entschuldigung- dummen Kommentaren nichts kaufen kannst, hier etwas zu lesen. Direkt aus dem PSDK:
Zitat:

Managing Taskbar Buttons
The Shell creates a button on the taskbar whenever an application creates a window that isn't owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window.

The Shell will remove a window's button from the taskbar only if the window's style supports visible taskbar buttons. If you want to dynamically change a window's style to one that doesn't support visible taskbar buttons, you must hide the window first (by calling ShowWindow with SW_HIDE), change the window style, and then show the window.

The window button typically contains the application icon and title. However, if the application does not contain a system menu, the window button is created without the icon.

If you want your application to get the user's attention when the window is not active, use the FlashWindow function to let the user know that a message is waiting. This function flashes the window button. Once the user clicks the window button to activate the window, your application can display the message.
Dem ist, denke ich, nichts hinzuzfügen.


Editiert von MathiasSimmack für Yheeky


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:37 Uhr.
Seite 2 von 3     12 3      

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