Search code examples
.netuser-controlswysiwyg

WebBrowserControl Scroll to Bottom


I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display the messages between the user and the recipient. How do I get the control to automatically scroll to the bottom every time I update the DocumentText of the control?


Solution

  • Thanks guys -- I voted you both up but neither would work out for my situation. What I ended up doing was

    webCtrl.Document.Window.ScrollTo(0, int.MaxValue);