PC Review


Reply
Thread Tools Rate Thread

How to check for scroll bars in web browser object?

 
 
Brett
Guest
Posts: n/a
 
      4th Apr 2005
I'm using the web browser object: SHDocVw.dll. I do this in form Load()

Me.AxWebBrowser1.Navigate("http://www.abc.com/")

Sometimes when a website loads, it causes horizontal or vertical scroll bars
in the web browser window. How can I detect these? I'm assuming they will
be completely run time since they do not appear until after the webpage
loads.

Thanks,
Brett


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      4th Apr 2005
"Brett" <(E-Mail Removed)> schrieb:
> I'm using the web browser object: SHDocVw.dll. I do this in form Load()
>
> Me.AxWebBrowser1.Navigate("http://www.abc.com/")
>
> Sometimes when a website loads, it causes horizontal or vertical scroll
> bars in the web browser window. How can I detect these? I'm assuming
> they will be completely run time since they do not appear until after the
> webpage loads.


The scrollbars are part of the document which is shown inside the control.
You can remove them in the 'DocumentComplete' event using
'Me.WebBrowser1.Document.body.scroll = "no"'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
Brett
Guest
Posts: n/a
 
      4th Apr 2005

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Brett" <(E-Mail Removed)> schrieb:
>> I'm using the web browser object: SHDocVw.dll. I do this in form Load()
>>
>> Me.AxWebBrowser1.Navigate("http://www.abc.com/")
>>
>> Sometimes when a website loads, it causes horizontal or vertical scroll
>> bars in the web browser window. How can I detect these? I'm assuming
>> they will be completely run time since they do not appear until after the
>> webpage loads.

>
> The scrollbars are part of the document which is shown inside the control.
> You can remove them in the 'DocumentComplete' event using
> 'Me.WebBrowser1.Document.body.scroll = "no"'.
>


The above line gives a run-time error because intellisense doesn't show
anything after document.

I'm trying to set a certain width and detect if the webpage has gone past
that width. I can set my form to say 800 width. If the webpage is wider,
it will scroll out of viewing area tothe right, as the web browser object
seems to grow dynamically. It will grow past the form width depending on
the web page. How can I check for that?

Thanks,
Brett


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scroll Bars in Embedded Object LindaQ02 Microsoft Excel Misc 0 22nd Sep 2009 01:31 AM
Using a div with scroll bars - can we get the scroll bars on the left instead of the right side? UJ Microsoft ASP .NET 1 1st Nov 2006 09:32 PM
Menu Control-expanding child items cause browser scroll bars to ap =?Utf-8?B?am9qb2Jhcg==?= Microsoft ASP .NET 0 13th Jul 2006 07:05 PM
Launch IE Browser and manage vertical scroll bars =?Utf-8?B?Z2FyeQ==?= Microsoft Excel Programming 2 10th Apr 2006 11:51 AM
Help! Scroll Bars Scroll Down More Than One Page Shelly Faulk Windows XP General 1 23rd Nov 2003 05:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:42 AM.