Results 1 to 3 of 3

Thread: [RESOLVED] Browser scrollbar always at the bottom

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Resolved [RESOLVED] Browser scrollbar always at the bottom

    The document page gets longer and longer but the webbrowser's vertical scrollbar is always at the top. How can I make it always at the bottom?


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Browser scrollbar always at the bottom

    Quote Originally Posted by jmsrickland View Post
    The document page gets longer and longer but the webbrowser's vertical scrollbar is always at the top. How can I make it always at the bottom?
    Found this in my code bank...

    Code:
    ' how to scroll Webbrowser control
    Private Sub Command2_Click()
    
        Dim MaxScrollY As Long
        Dim MaxScrollX As Long
        
        MaxScrollY = WebBrowser1.Document.body.scrollHeight
        MaxScrollX = WebBrowser1.Document.body.scrollWidth
        
        ' example: scroll VERT and HORIZ bars to max positions.
        WebBrowser1.Document.parentWindow.scrollTo MaxScrollX, MaxScrollY
    
    End Sub

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Browser scrollbar always at the bottom

    Works great! Thanks a zillion


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

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