Results 1 to 7 of 7

Thread: Scroll to the end of a Scrollbar

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Scroll to the end of a Scrollbar

    I'm adding a horizontal scrollbar to a listbox, and I need it scrolled all the way to the right end? Do you use SendMessage? :unsure:
    Don't Rate my posts.

  2. #2
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Hi Madness.

    When you say adding a scrollbar do you mean an external one like a hscroll control or not?


    Cheers

  3. #3
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    I think you could just get the listbox to select the last entry in it's list.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Is this what you require?

    VB Code:
    1. Private Declare Function SendMessageByNum Lib "user32" _
    2. Alias "SendMessageA" (ByVal hwnd As Long, ByVal _
    3. wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    4.  
    5. Const LB_SETHORIZONTALEXTENT = &H194
    6.  
    7.  
    8. Private Sub Form_Load()
    9.  
    10. SendMessageByNum list1.hwnd, LB_SETHORIZONTALEXTENT, 250, 0
    11.  
    12.  
    13.  
    14. End Sub

  5. #5
    Addicted Member
    Join Date
    Jul 2000
    Location
    FeedMeTown, Ohio
    Posts
    176
    List1.Listindex = List1.List(list1.Listcount-1)
    Never tie a rock to your ankle while randomly selecting stones to throw from high places.

  6. #6

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Originally posted by laserman
    Is this what you require?

    VB Code:
    1. Private Declare Function SendMessageByNum Lib "user32" _
    2. Alias "SendMessageA" (ByVal hwnd As Long, ByVal _
    3. wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    4.  
    5. Const LB_SETHORIZONTALEXTENT = &H194
    6.  
    7.  
    8. Private Sub Form_Load()
    9.  
    10. SendMessageByNum list1.hwnd, LB_SETHORIZONTALEXTENT, 250, 0
    11.  
    12.  
    13.  
    14. End Sub
    Thats what I'm doing at the moment, but I need to horizontal scrollbar scrolled all the way to the end.
    Don't Rate my posts.

  7. #7

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    *bUmP*
    Don't Rate my posts.

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