Combo API
Updated Monday December 26, 2011
   
Category
Topic
Alignment
vb6
vb5
vb4-32
SetWindowLong: Right-Align List Contents in a Combo
Right-align the contents of the list portion of a style-2 combo, reposition the dropdown list's scrollbar, and even move the combo's dropdown button. Nov 3.2001


Components SendMessage: Make a Style-0 Combo Edit Read-Only
Method to disable text editing in a 'Style 0' combo box (VB5 or earlier, but works in VB6 too). May 5.1999

WM_CONTEXTMENU: Kill the Default Combo Box Context Menu
Eliminating the combo edit context menu via subclassing.  Dec 19.2000

FindWindowEx: Obtain Combo Box Edit Window Handle
Using FindWindowEx. Code valid for Windows 95, 98 and NT4.   May 13.1999

GetComboBoxInfo: Obtain Combo Box Edit and List Handles on Win98/NT5
Using the GetComboBoxInfo API introduced in Windows 98 and NT5 only.   May 13.1999

SendMessage: Set 'MaxLength' in a Combo's Edit Box
Duplicate the text box MaxLength property in a Style-0/Style 1 combo. Updated June 6.1999

WM_LBUTTONDOWN: Substitute a Tabbed List for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard List control supporting tab stops. Mar 16.2001

WM_LBUTTONDOWN: Substitute a ListView for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard Listview control. Mar 16.2001



Effects
vb6
vb5
vb4-32
SendMessage: Add Balloon Tips to a Combo Edit Box
Notify users of actions using a balloon tip under XP or later. Mar 10.2003

SendMessage: Use Cue Banners to Prompt Users
XP-look prompting for edit and combo controls. Mar 10.2003

WM_PAINT: Subclassing to Create a Flat Combo Box
Use the DrawEdge API to alter the appearance of a combo box. Nov 24.1999



Height
vb6
vb5
vb4-32
MoveWindow: Change Combo Box List Height
Now you can set the number of items displayed in the dropdown portion of a combo box. vb5, vb4-32 only. July 24.1998


Width
vb6
vb5
vb4-32
SendMessage: Change Combo Box List Width
How to change to change the display width of the list-portion of a dropdown combo box. July 10.1998

GetTextExtentPoint32: Change Combo List Width Based on Contents
How to change to change the display width of the list portion of a dropdown combo box. Demonstrates using SendMessage, GetStockObject, SelectObject and GetTextExtentPoint32 to determine programmatically what the proper width should be to accommodate the longest item. July 10.1998



Misc
vb6
vb5
vb4-32
vb4-16
vb3
SendMessage: How to Show and Hide a Combo Box Dropdown List
How to show & hide a combo box dropdown list from code.
Jan 8.1997

SendMessage: Duplicate List Contents to Another List or Combo
API wrapper functions to copy a list's contents to either another list or combo. May 11.1999

SendMessage: Instantly Fill a Combo with Files, Folders or Drives
Use SendMessage to populate a combo in one call. May 14.1999

Pure VB: Saving Combo Settings Between Application Runs
Quick method to cause a list box to right-align its contents. Oct 1.2001



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter