Results 1 to 3 of 3

Thread: [RESOLVED] Dropdown Combobox...Show more items?

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking [RESOLVED] Dropdown Combobox...Show more items?

    How do you get a combo box to display more items?
    Anyone got the API code for it?

  2. #2
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043
    This way ?

    VB Code:
    1. Option Explicit
    2.  
    3. 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
    4.  
    5. Private Sub Form_Load()
    6.     SetDropHeight Combo1, 300
    7. End Sub
    8.  
    9. Public Sub SetDropHeight(cbo As ComboBox, lngHeight As Long)
    10.     Dim intScaleMode As Integer
    11.     'Store the current scalemode
    12.     intScaleMode = cbo.Parent.ScaleMode
    13.     'Set it to pixels
    14.     cbo.Parent.ScaleMode = vbPixels
    15.     'Move the check box
    16.     MoveWindow cbo.hwnd, cbo.Left, cbo.Top, cbo.Width, lngHeight, 1
    17.     'Reset the scalemode
    18.     cbo.Parent.ScaleMode = intScaleMode
    19. End Sub
    oh1mie/Vic


  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width