Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

[VB6]Scrolling Down The Web Browser Control

I Would like to scroll down my web browser control to the end of the page By the click of Command1

Any ideas? Can't get it to go. Thanks

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
[VB6]Scrolling Down The Web Browser Control
I Would like to scroll down my web browser control to the end of the page By the click of Command1

Any ideas? Can't get it to go. Thanks

Scrolling A Web Browser Control In Code
Hi all.
Been trying to do this for the last few hours. I need to scroll a embedded MS web browser control from VB6. Both up and down. Basically its a touch screen application and the regular scroll bars are just to darn small. (and non TS friendly)

I did find:
Document.body.scrollTop = 20000000
This does go to the bottom of the page. Problem is is does not work on every web page out there. Only some.

I also tried sending up / down keystrokes after setting focus to the browser control. But sometimes it seems the focus ends in a text box on the web page and that also only works half the time.

So... any ideas?????


Anyone Know How To Hack The Browser Control To Detect Scrolling?
There are couple of events in the browser controls (shdocvw.ocx) but none of them can detect if a page is being scrolled.

Does anyone have any ideas about how this could be done?


Scrolling To Bottom Of A Web Browser
Hello, is it possible to have a webbrowser automatically scroll to the bottom on command? I know I could just do it in the html code with java or whatever, but is there a visual basic built in function?

eg: I have a simple chat program, and I want it to scroll to the bottom of the window everytime its reloaded (where the most recent text would be)

Any help would be appreciated, thanks

Programatic Scrolling Of Web Browser Comtrol
Am looking for some help on how to programatically scroll the VB 6 web
browser control.

Essentially I want to be able to display a never ending-scrolling window of
html files.

Thanks in advance for any pointers.


VB Browser Control Browser Type
Is there anyway to make a browser emulate a browser other than IE? I would like to use a VB Browser control, but I would like it to pretend as through it was netscape when contacting secure servers...

Assistance is as always appreciated

Create New Tabs In A SSTab Control, Then Copy A Web Browser Control
How can I do this?

I want to create a new tab in a SSTab control, then put a new web browser (a copy of it) in it.

Also, how can I find out which tab is currently open in the SSTab control programmatically?

And how can I, with a web browser control, do something when the mouse hovers a link (e.g. get its destination)


Scrolling A Web Control
I'm using VB6 under Vista with IE7.

I added a web control to a page, loaded up the page and it works great.

Except when the web page is longer than the web control I drew on the screen. Then it just chops off the bottom of the web page.

In design mode a scroll bar appears on the right hand side of the screen. But at run time that scroll bar isn't there and you just can't scroll down the page.

How do I get the page to scroll?

Thanks for your help.


Web Browser Control - Help With Opening Link On Another Control In Different Form

I have two forms, each one with a web Browser control. I would like to be able to click on a link located on control A on Form1 to open the link on Control B on form2. Is it possible??


Auto Scrolling Web Control
Anyone know if it's possible to make MS WebBrowser control
to automatically scroll down to the bottom of the page?

Scrolling Ieplorer Control
I have on my page an 'internet controls' control. In it i open a file on the local computer.

What i want to be able to do is trigger the up or down scrol button by clicking on a command button for up or down.

Can anyone give me some pointers?


Webbrowser Control Scrolling I am yet again with a small problem....

I've just noticed this...when you place a webbrowser control on your form and set it to resize each time the form is resized a problem occurs...

Apparently, if the website normally has the horizontal IE6 scrollbar on them, this scrollbar refuses to show up on the web browser control when placed on the form...

My two questions are....

#1 - Why doesn't the horizontal scrollbar show up when resizing the control, allowing you to move and view the left / right of the page...

#2 - Is there anyway to solve this and hence return the missing scrollbar to it's rightfull place?

Tanx in advance....

Scrolling Label Control
I'm just wondering if anyone has any good code that I could use that creates scrolling text in a label box. I've downloaded a bunch off of freevbcode, but they all seem to have problems.

WebBrowser Control With No Scrolling?
Is it possible to have the WebBrowser without the scrollbars on the WebBrowser control??

Looking For A Scrolling-textbox Control
Can anyone help me in locating a control that acts like a standard textbox, but if the length of the text put into it is longer than can fit, it will automatically scroll horizontally at a speed designated by me?

[I guess a lot like the old JS scrolling textbox ]

How To Control Scrolling On Textbox?
Hi Folks,

I have a textbox, and this has a lot of records in it. I also have a combobox, which is for the line of the records. How do I code my VB such that when user selects the nth line, my textbox will be able to display the nth line as the first line?

For example, the contents of my textbox is as follows:

"a", "for", "apple"
"b", "for", "boy"
"c", "for", "cat"
"d", "for", "dog"
"e", "for", "egg"
"f", "for", "flower"
"g", "for", "gun"

If user selects 5 on my combobox, the textbox will automatically display this:

"e", "for", "egg"
"f", "for", "flower"
"g", "for", "gun"

but they would still be able to scroll up and down if they want.


Scrolling WebBrowser Control
Hello All! Would appreciate any input as to how I could scroll a web browser control vertically. I access pages that are larger than the control on the form, and would like to have a way to scroll the page up and down using code. I have made a few attempts using API calls but they all seem to fail. I would appreciate any insight into how this can be accomplished.

Horizontal Scrolling For The MSChart Control

I am using the mschart control in my application to chart readings versus time that I obtain from an external hardware.

The number of readings taken are specified by the user by entering a number of samples. The x axis of the chart is controlled by the number of samples entered and the sampling period used.

Now here is the problem. Beyond 100 samples, the chart becomes distorted and looks alot like a thick horizontal line. I am thinking that the reason for this is the fact that the x axis now becomes to broad and the chart cannot display itself legibly.

I am thinking that if the chart could have some sort of horizontal scrolling capability, it would be able to give a legible chart regardless of the number of samples taken.

Does anyone know how this can be done? I would appreciate it very much..


Horizontal Scrolling In InternetBrowser Control
Is this even possible? if so, then how?

Horizontal Scrolling For The MSChart Control

I am using the mschart control in my application to chart readings versus time that I obtain from an external hardware.

The number of readings taken are specified by the user by entering a number of samples. The x axis of the chart is controlled by the number of samples entered and the sampling period used.

Now here is the problem. Beyond 100 samples, the chart becomes distorted and looks alot like a thick horizontal line. I am thinking that the reason for this is the fact that the x axis now becomes too broad and the chart cannot display itself legibly.

I am thinking that if the chart could have some sort of horizontal scrolling capability, it would be able to give a legible chart regardless of the number of samples taken.

Does anyone know how this can be done? I would appreciate it very much..


Disable Control But Keep Scrolling Enabled
OK this is going to sound bit weird but I have a combobox, listview and listbox components where direct editing is allowed.

Now I want to disable the control for those users who doesn't have proper permissions so they can't edit anything but I still want them to scroll though the data so they can see the full set of data without going to edit mode which enables all the controls and which intern allows scrolling.

Any idea how to do this..?


Mouse Wheel Scrolling In Control
I am evaluating two different ActiveX Treeview controls at the moment.

Now the one allows me to move the window scrollbars up and down with my mouse, yet the other tree control does not.

And as luck would have it, I prefer the tree that does not support the mouse scrolling, but I really need mouse scrolling to work!!!

Is there any way I can force this control to support mouse wheel scrolling? I don't see any properties or events in its reference.


Scrolling In Rich TextBox Control
Once I have searched for some text in a Rich TextBox Control and it is found, how do I scroll the control so the line that the found text is on is at the top of the control?


Active X Datalist Control Scrolling
I am new to using VB6.  If a user highlights a row in an Active X Datalist Control, but then scrolls the selected item out of sight, is there anyway to automatically force the highlighted item to reappear?  

I've looked around but don't happen to see a solution.  Some have suggested methods/properties such as
ScrollTo, TopIndex, EnsureVisible.  Maybe I'm just missing something that is obvious, but I don't see those as options with this control.  Thanks.

Scrolling Thru The Datagrid In User Control
I have a user control which has a datagrid,I've hard coded this data grid to display a recordset.
When I add this control to any form, I am not able to scroll thru the scroll bar(during runtime). I am a novice.....could anybody tell me how to make this happen.


Web Browser Without The Web Browser Control
I was wondering if there was a control similar to what Netscape uses (or not similar at all....I'm just looking for something that's not made by MS.) If anyone knows of another good control, I'd like to see it. I didn't see one at CCRP or PSC, but I mighthave missed something...

Jacob Sheehy

The more I C, the less I see.

Web Browser Without Using The Browser Control
I've been able to successfully make a web browser using the web browser control, but I'd like to be able to make one without having to rely on, what is essentially, internet explorer.

I've managed to find one successful HTML parsing code, which does exactly what it's supposed to, but it takes considerably longer than a normal webpage takes to load.

The next problem is working out where the webpage should be displayed. My first thought was a rich text box, but I was wondering if there is anything else I could use. I'm quite possibly asking too much here, and I'm quite possibly using the wrong programming language to attempt this, but I thought it was worth a shot.

Any ideas?

Scrolling The Viewable Area Of An Image Control
I'm trying to make a program which allows for a smaller section of a given jpg to be shown in a image window. I can make the file fit the window, but what I need to do is make it so I can use the vertical and horizontal scroll bars shift the jpg. I have not done a lot of graphical programming before so I am not sure how to go about doing this. I think the image control would be better than the picture box for this but I am open to suggestions.


DataCombo Control - Get To List More Than 8 Items W/o Scrolling
I have a datacombo box, and my client wanted to know if I can get it to list more than the 8 or so items without scrolling through them, is there a way to do this?

Adodc Control Caption And Scrolling Problem
when I query a database to check for duplicates the caption of my adodc control(cashR)becomes the record count no.. The user can no longer use the adodc control to scroll through the records.
here is my query code
CODE     cashR.RecordSource = "Select spaceno from cash_receipts where spaceno = " & s
     If cashR.Recordset.RecordCount = 0 Then
     MsgBox "No Record Available"
     MsgBox "Record Available"
     End If

WebBrowser Control Does Not Get Focus (for Scrolling) Unless Clicked
I'm using a WebBrowser control to display a simple HTML report.

However, I'm unable to use the MouseWheel to scroll the control's contents unless the WebBrowser control is clicked first.

Once the control has been clicked,

ListView Control: Scrolling To Selected Record
In report mode, is it possible after loading data into the ListView control to scroll to the currently selected record? I am selecting the record programmatically by using

Set ListView.SelectedItem = ListView.ListItems(index)

This seems to select the correct item, but after clearing and reloading the control, it only shows the top records, not the records near the selected item. The user would then have to scroll down to find the selected item. One note: I need to do this while another control has the Focus. I am selecting the record AFTER loading the data.

Keep A Control Stationary When Scrolling Parent Scrollablecontrol

I have created a usercontrol that inherits from ScrollableControl, we'll call it ScrollC. I have several controls in ScrollC.

A few of those controls need to remain stationary when the user scrolls ScrollC.

Right now, I just set the desired location of the stationary controls in the OnScroll method of ScrollC. While this accomplishes the task, it isn't too pretty when the user scrolls. The stationary controls end up jumping up and down as the user scrolls.
Anyone know how to get rid of that jumping behavior? Is OnScroll the wrong place to be manually changing the stationary controls' positions?


[Not Resolved] Large Tab Control Auto Scrolling
This project is in Access2000.

I have a form with a really large tab control on it. All of the other controls belong to one of the 4 pages of the tab control. The tab control is so large, it has to be scrolled up and down. (I would make it smaller if the design of this project was up to me, but its not so i cant).

When FrmTab loads, the view is not at the top of the first page, but rather scrolled down a little bit. Also, when switching between pages, when one particular page is focused, the view is always scrolled down an inch or so.

My goal is to have the scroll bar always be at the top of the tab control when it loads, or when the page is changed.

I considered using the onchange event and the msghook package from the FAQ on how to have the mousewheel attached the scrollbar rather than the record browsing interface. This is a possible solution, but I'm eager to find a better/more simple solution, since this project will be distributed to many people, and I prefer to keep it as just 1 .mdb file.

I hope against hope that there is an easy method or trick for making this behave correctly. Any advice?

Edited by - mod on 8/23/2004 9:47:14 AM

Scrolling Problems In MS Data Grid Control
I am using the MS Data Grid Control to link to an MS Access DataBase

When I get the records for a table on the control , my application saves
the database table to an MS Word Document table.

All of this goes perfectly Ok as long as vertical scrolling does
not begin in the Data Grid Control which is representing the table.

As soon as the vertical scrolling begins , all the data that I am
writing to the Word Table goes topsy turvy and becomes messed up
However , the Access Database stores and retrieves perfectly still.

I cannot understand why scrolling is making this happen?

I would appreciate if someone helps me .

Form Scrolling Control - Custom Scrollbar Colors ..
A long time ago I was working on a form scrolling control where you would pass the control a form and it would place that form into a picturebox and add custom colored scrollbars when needed, needless to say I never finished it and would like to use it in an application that I'm working on. I could never figure out how to design the scrollbar scrolling / form movement properly like the way it is with MS scrollbars ...

In anycase I was wondering if someone would maybe help me along over the hump and give it a try .. attached is what I had when I left off.


Listview Scrolling With Custom Scrollbar Activex Control... Please Read!
I am in dire need of a extremely good way of using the Microsoft listview control with a custom made scrollbar that has the same properties as the regular VScroll that is built into VB6 (Max, Min, Value, etc)...

Now I have done a ton of searching around and I cant seem to find a good way of doing this that is just has good as the regular scrollbar that is built into the listview... I dont want my users to notice a difference in how the feel, just how they look...

Anyway, I have a custom control I write that functions as a scrollbar, and works quite well...

Now let me also tell you I am using the alternating background function that is available from the code bank I believe... if not here it is:


Public Sub AltLVBackground(LV As ListView, _
ByVal BackColorOne As OLE_COLOR, _
ByVal BackColorTwo As OLE_COLOR, _
frm As Form)
Dim lH As Long
Dim lSM As Byte
Dim picAlt As PictureBox
With LV
If .View = lvwReport And .ListItems.Count Then
Set picAlt = frm.Controls.Add("VB.PictureBox", "picAlt")
lSM = .Parent.ScaleMode
.Parent.ScaleMode = vbTwips
.PictureAlignment = lvwTile
lH = .ListItems(1).Height
With picAlt
.BackColor = BackColorOne
.AutoRedraw = True
.Height = lH * 2
.BorderStyle = 0
.Width = 10 * Screen.TwipsPerPixelX
picAlt.Line (0, lH)-(.ScaleWidth, lH * 2), BackColorTwo, BF
Set LV.Picture = .Image
End With
Set picAlt = Nothing
frm.Controls.Remove "picAlt"
LV.Parent.ScaleMode = lSM
End If
End With
End Sub

When I use a function like this to scroll:

Public Sub ScrollListView(lst As ListView, ByVal Shift As Long)
If Shift < 1 Then
ElseIf Shift > lst.ListItems.Count Then
End If
End Sub

The user can see a big difference between how the normal scrollbar functions and the custom scrollbar, because the data lags as the image behind it is being moved... this is my theory...

Because when I dont add the alt bg it scrolls fine...

and when the listview is populated I just set the total items to the max of the scrollbar, and on the scroll event call
ScrollListView myList, scroller.value
and that works fine, but when I have the alt bg it messes up...

So I need a pure api method of doing the same above that will give me crystal clear results and look and act like I am scrolling the listview with the normal scrollbars that microsoft implemented


Scrolling Down The WebBrowser Control To Bottom Of Page Via VB Code. (RESOLVED)
In something as simple as:
Option Explicit

Private Sub Command1_Click()
    On Error Resume Next
    Me.WebBrowser1.Document.Write Me.Text1.Text & "<br>"
End Sub

Private Sub Form_Load()
    Me.WebBrowser1.Navigate "about:blank"
    Me.Text1.Text = "Sample <b>Message</b>"
End Sub

How does one get the WebBrowser Control to scroll to the bottom of the page after each document.write?

Clint LaFever (aka: DaVBMan)

Edited by - DaVBMan on 7/10/2003 1:56:26 PM

With Control Timer, How To Make Label Caption Scrolling From Centre (Animated)
Dear Sir or Madam,...

Hi all of you me....., With Control Timer, how to Make Label Caption Scrolling From Centre (Animated)
(Use : Len, Leng, Left and Right)

I needed so much and soonest..

Control Of Web Browser In VB
I have an application in which i have web browser control which runs web pages.
If on click of a button on the web page i want to activate an activex on the local application .

how do i get control of the activex from the web page.

Do let me know?

My mail id is

Web Browser Control
I need to be able to save the exact source code of the web page being displayed in my web browser control. I cant use the iNet http transfer on the site i need it for, i think its a secure server. And I cant download the site seperatly because its all in php, and the source I need to save appears after completing a form. I've been stuck on this for several days, any help would be appreciated. Thanks!

Browser Using IE Control
Right.... I'm making an IE browser. I want to make the Back and Forward buttons like in IE, (a button with an arrow next to it, and when you click the arrow, a menu with all the pages visited appears, and the user can select one to go back to that page. If you click on the button, it goes back one page. And after loading each page, it checks if it can go back one. If not - then it grays out the button). I was battling with myself on whether or not to post this in the General forum - correct me if I made a mistake...

Web Browser Control
i didnt get a response to my first question so im going to try to something new. ive seen alot about the "web browser" control. im trying to download a page and get some data from it.

ive tried the inet control and it didnt work well. seemed almost like i was losing data or it was getting cut off or something. maybe some sort of max length of what the inet can bring back to a text box.

i also tried the mentalis code to download and it worked great but the page i was downloading was some javascript not enabled. not the page i wanted.

so my question....
could i use the web browser control to load a page that requires java script enabled and then access the source code of the page loaded in the web browser control?

Web Browser Control
hello, i have a program that listens on a socket for the string "connect" from a client program. When my program seed "connect" as the data, it loads up a new form with the web browser control, and tells the control to navigate to a specific site. the web browser control does its work, then closes, and opens up the socket for a new connection.

When a new connection comes in, a new web browser control form loads up, but this time, its at the last page i was at; maybe something to do with cookies, cache, history. If i close down the whole program and start again, i start off at the actual site i was supposed to begin with on the second try.

using the web browser control, how can i disable the control from using the cache, history? I took note of a site on msdn that said i can pass certain flags to the .navigate event. Flags of interest were;

Public Const navNoHistory = &H2
Public Const navNoReadFromCache = &H4
Public Const navNoWriteToCache = &H8

And i made use of them as so

webbrowser1.navigate "", navNoHistory & navNoReadFromCache & navNoWriteToCache, my question is, are these the correct hex values for these flags, and does my use of & equate to "and this constant"?

nonetheless, i want the webbrowser control to load the actual starting page each time, not pages based on cookies, cache, history after the first time.


Web Browser Control
I developed my own web browser some time ago and I used the web browser control. The web browser was created under Win9x using VB 6.0. Recently I installed this web browser on Win XP Pro SP2 but I'm getting a run time error trying to access Internet options and the control will not navigate to the home page. Is this a VB 6.0 vs. VB.NET issue? I know the Shell command is a little different (I'm using taskid=Shell(control, inetcpl)) and maybe the web browser object is different too. Does this browser need to be rewritten using VB.NET? Thanks to all who reply.

Web Browser Control?
I've created an app which contains the web browser control. I created a web page which the app accesses. I tested today and I got to the page OK. When I tried later, the page would not display in the browser control, it remained blank. When I saw this, I tried going to the page in Internet Explorer and there was no problem, it displayed OK. Any ideas on why the web browser control within the app failed to display the page? I am accessing the page from a wireless network and the page is being hosted on my own PC with the Abyss Web Server.

Web Browser Control
hi, how can i put the web browser control into my app and make it so there NO scroll bars no matter how big the page inside is?

Web Browser Control
ok i saw a program someone made for a site i visit. he said he used the webbrowser control to do it. it basically had you enter a name then it went to a site (you couldnt see it do it) and went to the search members on that site and ran an advanced search for the name and if it found it it told you. can anyone explain the webbrowser control and how to use it to me

Using The Web Browser Control
Why doesn't this work - should basically send string to search field on yahoo?

many thanks,


Private Sub Command1_Click()

WebBrowser1.Navigate2 ("")

WebBrowser1.Document.All.sf1.Value = "matt"

End Sub


Copyright 2005-08, All rights reserved