Hallo,
ich habe eine Custom Task Pane, das mit einem UserControl erstellt wird.
Das UserControl enthällt u.a. ein Panel, in das ich ein Window einer anderen Applikation integrieren will (Re-parenting).
Mit Hilfe der Win32 Api und "SetParent(hndl, handl) gelingt mir das auch.
Leider lässt sich das Fenster nicht so einpassen wie ich das gerne hätte. Folgende Probleme treten aktuell noch auf.
a) Das Window soll innerhalb des Panel maximiert werden. Es findet zwar eine maximierung statt, aber das Panel wird nur in der Breite voll ausgefüllt, nicht aber in der Höhe.
b) Ich möchte, dass wenn die CustomTaskPane verbreitert wird, das Window wieder passend in das Panel der UserControl eingepasst wird. Wenn ich aber versuche dies innerhalb des Resize-EventListerners zu machen, "vibriert" die ganze CustomTaskPane und lässt sich kaum noch bedienen. Evtl. ein Fokus-Problem?! Oder es entsteht eine Art Schleife, weil der Event während des Ziehens ständig ausgelöst wird.
Ein Resize-End Event gibt es nur bei einer Form, aber das UserControl wird ja direkt in die CTP eingebettet.
c) Wie kann ich verhindern, dass der User das Window innerhalb des Panel verschiebt?
d) Obwohl ich für die CTP bzw das UserControl mindest-Werte für Breite und Höhe gesetzt habe, wird dies von der CTP scheinbar ignoriert.
Viele Fragen, ich hoffe ihr könnt die eine oder andere lösen oder mir ne Anregung geben.
Gruß
RZ
ich habe eine Custom Task Pane, das mit einem UserControl erstellt wird.
Das UserControl enthällt u.a. ein Panel, in das ich ein Window einer anderen Applikation integrieren will (Re-parenting).
Mit Hilfe der Win32 Api und "SetParent(hndl, handl) gelingt mir das auch.
Leider lässt sich das Fenster nicht so einpassen wie ich das gerne hätte. Folgende Probleme treten aktuell noch auf.
a) Das Window soll innerhalb des Panel maximiert werden. Es findet zwar eine maximierung statt, aber das Panel wird nur in der Breite voll ausgefüllt, nicht aber in der Höhe.
b) Ich möchte, dass wenn die CustomTaskPane verbreitert wird, das Window wieder passend in das Panel der UserControl eingepasst wird. Wenn ich aber versuche dies innerhalb des Resize-EventListerners zu machen, "vibriert" die ganze CustomTaskPane und lässt sich kaum noch bedienen. Evtl. ein Fokus-Problem?! Oder es entsteht eine Art Schleife, weil der Event während des Ziehens ständig ausgelöst wird.
Ein Resize-End Event gibt es nur bei einer Form, aber das UserControl wird ja direkt in die CTP eingebettet.
c) Wie kann ich verhindern, dass der User das Window innerhalb des Panel verschiebt?
d) Obwohl ich für die CTP bzw das UserControl mindest-Werte für Breite und Höhe gesetzt habe, wird dies von der CTP scheinbar ignoriert.
Viele Fragen, ich hoffe ihr könnt die eine oder andere lösen oder mir ne Anregung geben.
Gruß
RZ
Comment