Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
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-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated