Results 1 to 7 of 7

Thread: [RESOLVED] File ListBox

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    52

    Resolved [RESOLVED] File ListBox

    How do I move up and down a file listbox using two buttons?

    Note when it reaches the end of the list it should go to the first.

  2. #2
    Addicted Member cha0s4u's Avatar
    Join Date
    Apr 2005
    Location
    new Delhi - 1ND1A
    Posts
    209

    Re: File ListBox

    select the nth item in the listbox when the item selection reaches index = 0;
    somewhere on this line ... i m not coding and trying this.. .so u may try to code in this direction!!
    - cha0s4u ENJOI

    Do Remember to RATE a post if it helps u,
    Ratings encrougage those who Know enough,to help others

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    52

    Re: File ListBox

    I am sorry that has not helped, I need a snippet of code

  4. #4
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: File ListBox

    Do you mean...

    VB Code:
    1. Private Sub cmdDown_Click()
    2.     If File1.ListIndex < File1.ListCount - 1 Then
    3.         File1.ListIndex = File1.ListIndex + 1
    4.     Else
    5.         File1.ListIndex = 0
    6.     End If
    7. End Sub
    8. Private Sub cmdUp_Click()
    9.     If File1.ListIndex > 0 Then
    10.         File1.ListIndex = File1.ListIndex - 1
    11.     Else
    12.         File1.ListIndex = File1.ListCount - 1
    13.     End If
    14. End Sub

  5. #5
    Addicted Member cha0s4u's Avatar
    Join Date
    Apr 2005
    Location
    new Delhi - 1ND1A
    Posts
    209

    Re: File ListBox

    Spoon Feeding!!!
    My God!
    - cha0s4u ENJOI

    Do Remember to RATE a post if it helps u,
    Ratings encrougage those who Know enough,to help others

  6. #6

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    52

    Unhappy Re: File ListBox

    You have to understand some of us are new to VB sorry for not being a pro!!!

  7. #7

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    52

    Re: File ListBox

    Great Thank you very much, It really hepled GAVIO

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