Results 1 to 7 of 7

Thread: Dropdownlist --> combobox???

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Netherlands
    Posts
    10

    Question

    LS

    Does anyone know if it's possible to change the length of a the dropdownlist from a "simple" combobox?

    - D -

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Just applied the following code will change you combo box width.

    Code:
    Option Explicit
    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
    
    Private Sub Command1_Click()
        SendMessage Combo1.hwnd, CB_SETDROPPEDWIDTH, CLng(Text1), 0
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Netherlands
    Posts
    10

    Wink

    Chris,

    Thanks for the fast reply, but I didn´t ask for that. I asked how to change the length of the dropdownlist from a combobox (so I can show more items when the user actvates it). Hope you also know the answer to that question.

    - D -

  4. #4
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Unhappy One suggestion

    Hello Dino

    As far as I know the only way you kan change
    the droplength of a combobox to use the
    combobox from the Microsoft Forms2 Object Library
    and change the Listrows property to the amount
    of items you wan't to show.

    Just wanna help
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Netherlands
    Posts
    10
    Anders,

    I get this error-massage when i put the object on my form
    "System Error &H80070485(-2147023739) Cant find library-file" perhaps the translation is not correct my message was partialy in Dutch. Did I do something during my installation?

    - D -

  6. #6
    Addicted Member
    Join Date
    Jul 1999
    Location
    St-Élie d'Orford, Quebec, Canada
    Posts
    133
    Hi,

    what VB and service pack are you running ?
    This error usually is caused by bad file references for the component you are trying to use ( licences for OCX )...

    Upgrade service pack ?
    Re-install VB ?

    hope I help...

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Netherlands
    Posts
    10
    Hi,

    I´m running VB6 Pro and I don't know anything about a service(pack). Is there really no other way to do this???

    - D -

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