How do you get a combo box to display more items?
Anyone got the API code for it?
Printable View
How do you get a combo box to display more items?
Anyone got the API code for it?
This way ?
VB Code:
Option Explicit Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long Private Sub Form_Load() SetDropHeight Combo1, 300 End Sub Public Sub SetDropHeight(cbo As ComboBox, lngHeight As Long) Dim intScaleMode As Integer 'Store the current scalemode intScaleMode = cbo.Parent.ScaleMode 'Set it to pixels cbo.Parent.ScaleMode = vbPixels 'Move the check box MoveWindow cbo.hwnd, cbo.Left, cbo.Top, cbo.Width, lngHeight, 1 'Reset the scalemode cbo.Parent.ScaleMode = intScaleMode End Sub
Spot on...Cheers :D