CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    E: 120°.6, N: 31°.3′
    Posts
    795

    Arrow Get Combo Box Component

    Hi everyone :

    I am doing one app, and in my dialog box , there is one control with Combo Box with dropdown ,now I want to get combo box component , how to do ??

    any help would be very appreciated .

    Thanks in advance !

    Regards.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Get Combo Box Component

    This will show you how to get the item that is clicked on, if that is your question.

    Code:
    Option Explicit
    
    Private Sub Combo1_Click()
      MsgBox Combo1.List(Combo1.ListIndex) & " is ListIndex # " & Combo1.ListIndex
    End Sub
    
    Private Sub Form_Load()
      Dim x As Integer
      For x = 100 To 1 Step -1
        Combo1.AddItem x
      Next x
      Combo1.List(1) = "test"
    End Sub
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2005
    Location
    E: 120°.6, N: 31°.3′
    Posts
    795

    Re: Get Combo Box Component

    Very good , that is what I want . Thank you , dglienna.

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

Featured