VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Make a dropdown bigger than its combobox Simple

Rokinroj  (3 Submissions)   Custom Controls/Forms/Menus   Visual Basic 3.0   Beginner   Wed 3rd February 2021

The only code I could find for this used tons of api and was a bit difficult (at least for me) this code is only 3 lines and works well.It
lets you save room on your form by making your dropdown bigger than its combobox. My use for this was as a state field on a form. The box showed the two letter abbreviation for each state, but if you dropped down the box it showed the full state name. I'm sure you will find your own uses for this

API Declarations
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Const CB_SETDROPPEDWIDTH = &H160

Rate Make a dropdown bigger than its combobox Simple (9(9 Vote))
Make a dropdown bigger than its combobox Simple.bas

Make a dropdown bigger than its combobox Simple Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters