Autor Beitrag
LittleBen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 258
Erhaltene Danke: 4

Win 7, Mac OS
Delphi 7
BeitragVerfasst: Di 03.01.12 00:43 
Hallo zusammen,
ich möchte ein Formular (nicht das ganze Programm) nur als Anzeige nutzen. Dieses Formular soll immer onTop stehen aber nicht anklickbar sein. Also wenn man auf dieses Formular klickt, soll nicht zu dem dazugehörigen Programm gewechselt werden. Denn wenn man ein anderes Programm auf Fullscreen laufen hat und dieses eine Formular darauf liegen hat, das anklickt, dann wird das laufende Programm, das auf Fullsceen läuft, minimiert und zu meinem Programm gewechselt. Und das will ich nicht...Auf diesem Formular wird z.B. das Bild einer Kamera angezeigt.
Ist das möglich?

Viele Grüße und ein gutes neues Jahr,
Benny
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 03.01.12 06:39 
Nur kurz (grad keine Zeit): WS_EX_NOACTIVATE als Fensterstil
glotzer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Di 03.01.12 09:49 

_________________
ja, ich schreibe grundsätzlich alles klein und meine rechtschreibfehler sind absicht
LittleBen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 258
Erhaltene Danke: 4

Win 7, Mac OS
Delphi 7
BeitragVerfasst: Di 03.01.12 12:34 
Vielen Dank für die Hilfe :)

EDIT: Mist...habe mich wohl zu früh gefreut. Denn das Formular, dass inaktiv bleiben soll, ist das 2 Formular des Programms. Und irgendwie funktioniert das dann nicht :gruebel:
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 03.01.12 13:53 
Vergleiche einmal die Fensterstile.

Seinerzeit bei deinen alten Delphiversionen war die Fensteranordnung ja noch etwas abenteuerlich. Ich weiß nicht welche bei dir den Stil WS_EX_APPWINDOW haben oder nicht haben usw.
Vielleicht liegt es daran...
LittleBen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 258
Erhaltene Danke: 4

Win 7, Mac OS
Delphi 7
BeitragVerfasst: Di 03.01.12 14:17 
Mhm...also wenn ich das Main-Formular auch Inaktiv stelle, dann funktioniert das andere Formular auch als Inaktiv. Nur nicht, wenn das Main-Formular normal aktiv ist.

Den Stil WS_EX_APPWINDOW? Öhh...kommt bei mir gar nicht vor.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 03.01.12 14:22 
user profile iconLittleBen hat folgendes geschrieben Zum zitierten Posting springen:
Den Stil WS_EX_APPWINDOW? Öhh...kommt bei mir gar nicht vor.
Ach ja, bei Delphi <= 2006 hatte den glaube ich nur das Application-Window.
Ich schaue heute Abend mal nach der Arbeit...
LittleBen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 258
Erhaltene Danke: 4

Win 7, Mac OS
Delphi 7
BeitragVerfasst: Di 03.01.12 21:18 
Habe noch ein bisschen nach inaktiven Formularen gesucht, aber es wurde immer das mit dem WS_EX_NOACTIVATE angesprochen...es funktioniert ja auch, aber nur wenn es das Hauptformular betrifft.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19338
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 03.01.12 23:08 
Das hat damit nichts zu tun. Wenn du ein zweites Formular in der selben Anwendung anzeigst, geht auch das Hauptformular nicht mehr. Das hat auch nichts mit Fensterstilen zu tun. Auch nicht mit Delphi, denn bei C# passiert das gleiche. Das ist offenbar einfach unter Windows so.

Als Lösung fällt mir ein das Fenster einfach in eine DLL auszulagern. Das sollte reichen um das Problem zu umgehen. Ausprobiert habe ich das aber nicht.

Für diesen Beitrag haben gedankt: LittleBen
LittleBen Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 258
Erhaltene Danke: 4

Win 7, Mac OS
Delphi 7
BeitragVerfasst: Mi 04.01.12 01:19 
Perfeeeeekt!!! So mache ich das gleich mal :)

EDIT: OMG o.O Es funktioniert :) :) Jänicke, bist einfach der Beste :D
Jetzt hätte ich nur noch die Frage, ob man das Formular auch immer im Vordergrund halten kann, wenn ein Direct-X Programm auf Fullscreen läuft.