![]() |
Combobox mit Treeview, ALT+TAB und Co.
Hallo DP-Community,
Ich habe eine Komponente bestehend aus:
Ich rufe also per DropDown-Button das Formular auf:
Da ich per SetWindowLong() eingestellt habe das es keinen Fokus kriegt, da der ja wie bei einer normalen Combobox auf dem Hauptformular liegen soll, habe ich nun versucht mit SetCapture,MouseUP,MouseDOWN,KeyPress,KeyUP,Keydow n mein Formular wieder zu schließen. SetWindowLong():
Delphi-Quellcode:
Nur stehe ich nun bei der Problematik das ich keine Ahnung habe wie ich ALT+TAB, STRG+ALT+DEL und Co. abfragen kann...
// Entfernt den Taskleisten-Eintrag
SetWindowLong(Formular.Handle,GWL_EXSTYLE,(GetWindowLong(Formular.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW )); // Entfernt den 3D-Rahmen SetWindowLong(Formular.Handle,GWL_EXSTYLE,(GetWindowLong(Formular.Handle, GWL_EXSTYLE) or WS_EX_STATICEDGE )); // Entfernt die Titelleiste SetWindowLong(Formular.Handle,GWL_STYLE ,(GetWindowLong(Formular.Handle, GWL_STYLE) and not WS_Caption)); Hat jemand eine Idee? Oder weiß vielleicht jemand wie ich bei dem Editfeld einfach fragen würde wenn es nicht gerade aktiv ausgewählt ist (also auch wenn die Anwendung / Formular nicht ausgewählt ist)? Hoffe das mir jemand helfen kann...laufe nämlich zur Zeit von einer Mauer zur Nächsten und komme eher mühsam weiter... MfG Alaitoc |
Re: Combobox mit Treeview, ALT+TAB und Co.
Grausam wenn man stundenlang sucht...es ins Forum stellt und es dann mit ein paar Codezeilen behebt :wall:
Delphi-Quellcode:
Und dabei war es so simpel ;_;
type
TFocusLostEvent = procedure (Sender:TObject) of Object; Type TFocusEdit = class (TEdit) Private m_pmfnFocusLost :TFocusLostEvent; procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; Public property OnFocusLost:TFocusLostEvent read m_pmfnFocusLost write m_pmfnFocusLost; End; --- { TFocusEdit } procedure TFocusEdit.WMKillFocus(var Message: TWMKillFocus); begin inherited; if Assigned(m_pmfnFocusLost) then begin OnFocusLost(Self); end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:11 Uhr. |
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 by Thomas Breitkreuz