Click here to Skip to main content
13,189,324 members (75,686 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 25 Jul 2006


, 25 Jul 2006
Rate this:
Please Sign up or sign in to vote.
how to make the standard combobox to drop custom controls

Sample Image - myComboBox.gif


I needed to drop a custom control when the comboBox button is pressed, so i adapt the comboBox to drop what i want. This article explain how to make a standard ComboBox to drop a custom control. You can use that method to drop a dataGridView in a datagridview if you need. I need to override the WndProc method of the ComboBox to stop the ComboBox to display the standard list.When the comboBox button is pressed, the message is captured and canceled and is shown a ToolStripDropDown control that contain the custom control. The custom control is dropped as a ToolStripDropDown, so we need a ToolStripControlHost to host the control that we want to drop. Have fun!


Refer to the MSDN topic for more details.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
Romania Romania

You may also be interested in...

Comments and Discussions

QuestionThanks! Pin
Member 98879286-Mar-13 0:26
memberMember 98879286-Mar-13 0:26 
GeneralThanks Pin
Archambault2-Mar-07 5:14
memberArchambault2-Mar-07 5:14 
GeneralRe: Thanks Pin
funygel4-Mar-07 9:22
memberfunygel4-Mar-07 9:22 
GeneralRe: Thanks Pin
Archambault5-Mar-07 3:15
memberArchambault5-Mar-07 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171016.2 | Last Updated 25 Jul 2006
Article Copyright 2006 by funygel
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid