scrolling down with a webbrowser control

Posted on 2003-03-11
Medium Priority
Last Modified: 2013-12-25

I'm making a chat program with winsock that outputs messages to the end of an HTML file, which displays in a webbrowser component. I need to tell the webbrowser to scroll down to the bottom of the HTML page every time I receive new data (using the winsock DataArrival event), but I can't access the position of the webbrowser's scroll bar. There doesn't seem to be a property for the webbrowser component that allows me to read/adjust where the scrollbar is set to.

I tried always writing an anchor at the end of the HTML file, and then running webbrowser1.Navigate("pagename.html#anchorname), but then the page just stops refreshing altogether. Is there a way around this problem I haven't thought of?

Question by:dedesk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

Rhaedes earned 240 total points
ID: 8114166
Try using:
WebBrowser1.Document.body.scrollTop = 9999999

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question