Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleChange the width of a ComboBox's dropdown area
KeywordsComboBox, ComboBox width
CategoriesControls
 
Use the SendMessage API function to send the ComboBox the CB_SETDROPPEDWIDTH message, specifying the desired width in pixels.

See also Change the height of a ComboBox's dropdown area.

 
Private Sub Form_Load()
    ' Set the width for the dropdown list.
    SendMessage Combo1.hwnd, _
        CB_SETDROPPEDWIDTH, 310, 0

    ' Select the first choice.
    Combo1.ListIndex = 0
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated