473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to check for scroll bars in web browser object?

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
Nov 21 '05 #1
2 2777
"Brett" <no@spam.com> 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/>

Nov 21 '05 #2

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
"Brett" <no@spam.com> 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
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Rwj Cherry CS2000 | last post by:
is there any way to disable or lock vertical scroll bars on a browser window? im a newbie and i just don't want them to appear on my screen. sometimes they appear on IE but not on mozilla. any...
14
by: mr_burns | last post by:
hi, i am tryin to alter the color of my scroll bars on a site i am workin on. the site is oarsome.martynbissett.co.uk, to access the css style sheet, type in...
7
by: Sharon | last post by:
I’m using the Panel control that contains a PictureBox control (for implementing the http://www.codeproject.com/cs/miscctrl/PictureBox.asp). The Panel is set to AutoScroll = true. I wish to...
0
by: jojobar | last post by:
We are using the ASP:Menu control (horizontal) for site navigation. The menu is contained by a table with css styles that allows us to give the illusion of a menu bar that runs the entire width of...
69
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow...
1
by: davidr | last post by:
Hi, I am using Divs with CSS to setup a layout for a site. I am using the <Div>s and style sheets below. I want the TopMenu to go across the entire top of the browser. It does go across the...
0
by: nevada17 | last post by:
My goal is to find a way to apply scroll bars across the y axis of about 25 check buttons so that my interface isn't too large. I've read about scroll bars and I realize that's its not possible to...
1
by: David_from_Chicago | last post by:
I am developing an application in Access 2000 (A2K) which has multiple forms and subforms. Until now, all subforms displayed scroll bars properly (according to the subform's property setting). ...
6
by: bgold12 | last post by:
I was using quirks mode (without a doctype) and set the overflow CSS property to :auto for the body tag like so: <body style="overflow:auto"> And it worked; it got rid of IE's default scroll...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.