Controls with popups

snarfblam

Ultimate Contributor
Joined
Jun 10, 2003
Messages
2,097
Location
USA
Some controls, for instance, the combo box and the datetime picker, popup a window that allows you to edit their value. When this window pops up it can be outside the bounds of the form that contains the control. It also does not take focus from the application's main form.

How can this behavior be emulated in a .Net application?

edit: I should have said this: My difficulty lies in not stealing the focus of the main window.
 
Last edited:
Yeah, so... to answer my own question...

This is how you make a popup control that not only can leave the bounds of the parent container (can't normally be done with control but can with a separate form) but doesn't steal focus from the form (can be done with a control but not a separate form).

http://www.vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Floating_Controls/article.asp

This control will not recieve mouse events, but the example can be modified to change this.
 
marble:
This is a really helpful article that opens the door to some great Control behavior. Thanks for digging it up and passing along the good info!
 
Back
Top