M
Martijn
Hi,
Coming from a win32 API background, I am trying to make a (temporary)
transition to C# .NET . I find myself frustrated by knowing the
underlying mechanism, but being unable to invoke it.
What I want is functionality similar to WM_PARENTNOTIFY. My control has
some sub-controls (I chose this approach to have Windows do most of the
house keeping) which I want to move by dragging them. Because of this,
the parent needs to be notified whenever the user clicks one of these
sub-controls.
I have looked into all the properties for Control and UserControl, but
none actually set allow parent notification.
As an alternative I figured I could make my own event to trigger the
parent, but of course I would only want to trigger an event if the parent
has a handler installed, but I have no idea on how to trigger these events
at the parent's side. How can I add an event(handler) to a control?
BTW, the parent is a derivative from the UserControl, and the child from
the PictureBox control.
Thanks for any pointers!
Coming from a win32 API background, I am trying to make a (temporary)
transition to C# .NET . I find myself frustrated by knowing the
underlying mechanism, but being unable to invoke it.
What I want is functionality similar to WM_PARENTNOTIFY. My control has
some sub-controls (I chose this approach to have Windows do most of the
house keeping) which I want to move by dragging them. Because of this,
the parent needs to be notified whenever the user clicks one of these
sub-controls.
I have looked into all the properties for Control and UserControl, but
none actually set allow parent notification.
As an alternative I figured I could make my own event to trigger the
parent, but of course I would only want to trigger an event if the parent
has a handler installed, but I have no idea on how to trigger these events
at the parent's side. How can I add an event(handler) to a control?
BTW, the parent is a derivative from the UserControl, and the child from
the PictureBox control.
Thanks for any pointers!