Hi Jeff,
The drop down part of a ComboBox control is a separate window, which
enables the drop down part to open up over other controls.
To implement a custom drop down window, we could use a WinForm, whose
FormBorderStyle property is set to None. But this solution is not very
good, because the form would take the focus and inactivate the main window
form. The functionality of the dropdown would be difficult to manage too.
A better solution is to derive a class from NativeWindow and create a popup
window, similar to a tooltip window, that can be shown using the
SW_SHOWNOACTIVATE setting and ShowWindow function via interoop. A class
created in this way would mimic the behaviour of the base Win32 controls
and it would be easier to create the desired internal functionality such as
item selection and so-on.
You may visit the following link for more information on how to do it using
NativeWindow.
http://vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Popup_Windows/
article.asp
I searched the web site '
www.codeproject.com' and also found a smarter
solution of using ToolStripDropDown to implement the drop down window. You
may visit the following link for more information on how to do this.
http://www.codeproject.com/useritems/simplepopup.asp
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.