all groups > dotnet drawing api > september 2005 >
You're in the

dotnet drawing api

group:

C#, WebBrowser control and accessing the ScrollBars?


C#, WebBrowser control and accessing the ScrollBars? Flip
9/29/2005 11:58:13 AM
dotnet drawing api:
I've tried asking this one three other newsgroups with no responses. :< I
was hoping that someone here with C++ and C# experience could help
nudge/guide me in the right direction please? I know it's not immediately
GDI+ applicable, but I'm trying to do this before using some Bitmap methods
(maybe that will help? :>).

I would like to find out the height of a webpage in the WebBrowser control
(.NET 2.0). Is there an easy C# API way to do this?

The easiest way I have found with the UI, is to make the control big enough
(anchor it and resize the parent form) and the scrollbars are disabled when
the whole HTML page is in focus. I would like to do that but
programmatically.

So far, I've found a C++ way to do this
(http://www.codeproject.com/miscctrl/scrollbrowser.asp). But I'm not C++
literate and would like to do this in C#. Any help/code samples would be
greatly appreciated.

Thank you.

Re: C#, WebBrowser control and accessing the ScrollBars? Flip
10/5/2005 1:47:56 PM
Howdy. I found what I was looking for. The secret is buried in the APIs, I
was able to force the WebBrowser control down to the bottom and then get the
height. Also to get the scrollbar width, I can instantiate a VScrollBar and
get it's width. Pretty simple! :>




[quoted text, click to view]

AddThis Social Bookmark Button