Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi MDI Fenster BorderIcons blockieren Anwendung? (https://www.delphipraxis.net/129559-mdi-fenster-bordericons-blockieren-anwendung.html)

moelski 21. Feb 2009 08:52


MDI Fenster BorderIcons blockieren Anwendung?
 
Moin !

Ich habe hier ne eher einfache MDI Anwendung. Wenn ich bei einem MDI Child einen der BorderIcons (also Minimieren, Maximieren oder Schliessen) mit der Maus gedrückt halte, dann blockt meine ganze Anwendung.

Ich habe da z.B. eine serielle Schnittstelle aktiv. Und wenn ich eben einen der drei Button gedrückt halte dann is Essig. Solange man drückt kommen keine Daten mehr rein. Oder sagen wir mal alles was mit der GUI zutun hat ist dann geblockt.

Ist das so gewollt? Kann man da irgendwas gegen tun?

Es ist sicherlich nicht normal das da jemand so einen Button gedrückt hält (macht ja eigentlich auch keinen Sinn), aber irgendwie ist das schon ein blödes Verhalten finde ich ... :gruebel:

Bernhard Geyer 21. Feb 2009 09:00

Re: MDI Fenster BorderIcons blockieren Anwendung?
 
Solange du Komponenten verwendest die von der Message-Queue des Hauptthreades abhängig sind ist das so. Probier mal die Serielle Kommunikation in einen thread zu verlagern

moelski 21. Feb 2009 09:05

Re: MDI Fenster BorderIcons blockieren Anwendung?
 
Moin !

Die Schnittstelle läuft schon selber als Thread.

Hmm warum aber kann man dann einen normalen Button gedrückt halten und da geht es? Läuft das nicht auch im Hauptthread?

toms 21. Feb 2009 09:09

Re: MDI Fenster BorderIcons blockieren Anwendung?
 
In borland.public.delphi.winapi hat Peter Below (TeamB) mal folgende Erklärung geschrieben:

Zitat:

If you hold down the mouse on the caption bar or drop down a menu Windows goes into a tight message loop of
its own that only processes mouse messages. This loop runs until the mouse
goes up again, so any processing that depends on the main message loop will
stop while the mouse is down. You get informed when such a loop is entered
or terminated by messages Windows sends to your form: WM_ENTERMENULOOP,
WM_EXITMENULOOP, WM_ENTERSIZEMOVE, WM_EXITSIZEMOVE. I think you could
cancel the operation by sending a WM_CANCELMODE to the form in response to
the WM_ENTER* messages but that will impact the corresponding functions of
your application. Mouse down events on the non-client area can also be
trapped by handing messages like WM_NCLBUTTONDOWN and not passing them on
to the inherited handler while your app is in a sensitive state.


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz