Results 1 to 6 of 6

Thread: VB6 listview selected

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2004
    Posts
    6

    VB6 listview selected

    Hallo,


    I have in VB6 created a listview

    The listview has 3 colums.

    Now i can select a row in the listview with the mouse pointer.

    The thing that i would do now is to push on a button and then a message box appears with the text that is selected in the listview ,but only the second row must be displayed in the msgbox.

    ex :
    1 beaf 22$
    1 meat 10$
    1 burger 5$

    so if a select row 2 ,the msg box must display : meat

    Who can help me with that ?

    Thanks a lot

  2. #2
    Member
    Join Date
    Oct 2004
    Posts
    43
    VB Code:
    1. Dim i As Integer
    2. For i = 0 To lstTheBox.ListCount - 1
    3. If lstTheBox.Selected(i) = True Then txtText.Text = lstTheBox.List(i)
    4. Next i

    Still, I have no clue if this works for the componoment listview as I don't got access to it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2004
    Posts
    6

    not working

    Hallo ,

    It is not working ,you can ad the listview control in components.
    it is the microsoft windows common controls 6.0

  4. #4

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2004
    Posts
    6

    code please

    Hallo Marty,


    Is it possible to give me the full code for my button ?

  6. #6

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