Sorry about the misspell: It should be mshtml.tlb not mshtml.tbl
Printable View
Sorry about the misspell: It should be mshtml.tlb not mshtml.tbl
yeah i tried em both :(Quote:
Originally Posted by jmsrickland
You were able to add the DLL, right, but not the mshtml.tlb?
Don't know exactly how you are doing it but the mshtml.tlb should be added to the reference list (not the components list). Is this what you are trying to do with out success?
this is an awesome tutorial thanks!! ^_^
How can I make a Tabbed webbrowser with TabStrips???? I have been looking for this for 2 days!!! Please help me!!!
I mean: When I click CommandButton1, then in tabStrip a second Tab appears with a second Webbrowser (like in IE7, Mozilla, Opera,....)
All I can find on website's Is Tabs for VB.net or VB2008 but NOTHING for VB6!! Please help!!
I am also trying to get a tabbed web browser, but on the moment I have problems with my progressbar. My progressbar doesn't stay on the place I want it to have with my screen maximized. If I resize my screen it replaces perfectly.
If someone could help me with Tabs or my progressbar, I would really appreciate that.
Using the method in the tutorial, how could you display the blocked pop-up? Using Internet Explorer 7, it displays the yellow bar and you have the option of allowing the pop-up, but it refreshes the page in order to do it. I've managed to achieve the same effect, however, is there a way of doing it without refreshing?
I have been looking for a way to open links in new window when a user RIGHT clicks on the menu and selects Open In New Window. This app is the only one I found that opens a new window,,, but there is no Source for VB6...
Can anyone supply the actual example on HOW TO open a a link in new window when user right clicks on the link and selects OPEN IN NEW WINDOW
I have tried to use this tutorial to open up a web page, fill out a form (you put in an IP address and info about that address comes out after submission) and extract the data from the form.
It works in the web browser window, I display the data from the filled out form successfully.
However, after the data is displayed the "WebBrowser1.Document.body.innerHTML" values do not match the displayed information.
Why is this.
Here is my code-
Code:Private Sub Command1_Click()
Dim doc As HTMLDocument
Dim strHTML As String
'go to the altavista (text) search page
WebBrowser1.Navigate "http://www.ip2location.com/free.asp"
'Wait until page is loaded
Do
DoEvents
Loop Until Not WebBrowser1.Busy
'Make doc reference to the document inside the webbrowser control
Set doc = WebBrowser1.Document
'Set field ipaddresses with the value of Text1
SetInputField doc, 0, "ipaddresses", Text1
'Submit the form
doc.Forms(0).submit
'Wait until result are loaded
Do
DoEvents
Loop Until Not WebBrowser1.Busy
'loop till we have some stuff in strHTML
Do
DoEvents
strHTML = WebBrowser1.Document.body.innerHTML
Loop Until (Len(strHTML) > 400)
'
' read in the text into string variable
'
strHTML = WebBrowser1.Document.body.innerHTML
Text2.Text = strHTML
'
'text is not matching the window.
'
What I want to do is put in some ip addresses and "submit" and then extract the results from a string variable. I see in the screen the results but the variable does not match. Using VB6 and IE6
The information that you inserted into a field on the page is only valid for that page. After you submit the Form you sit and wait for the returned responses which will be a new page. The information on one page doesn't mean it is going to be there on another page. Another problem you should recode to have your fields that you want to fill in be done in the _DocumentComplete event and not as the result of a loop being terminated by Loop Until Not WebBrowser1.Busy. I say this because the indicator .Busy can be triggered before the document has actually completed the process but in the _DocumentComplete event you are gauranteed that the process has completed.
Hello VB Forums!
Since this is a Internet Explorer based web browser, the code for the search bar was simple:
All you need is :
-1x Text Box
-1x Button
(and one, pre-existing URL bar)
And the code:
That's it!Code:Private Sub BUTTON_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BUTTON.Click
WebBrowser1.Navigate("http://www.google.com.au/search?hl=en&source=hp&q=" + SEARCHBOX.Text + "&meta=&aq=null&oq=googl")
URLBOX.Text = ("http://www.google.com.au/search?hl=en&source=hp&q=" + SEARCHBOX.Text + "&meta=&aq=null&oq=googl")
End Sub
Have Fun!
First, your code is not for VB6.
Second, that is still not the way to do it because you are using hard-coded string URL to be placed in the textbox
I dont understand- how do I use _DocumentComplete event?
I have seen this code but don't really understand when its called, would you do a loop until Page_Loaded is True (obvoiusly you set it to False before calling)?-
After I submit the form how would I retreive the data?Code:Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WebBrowser1.object) Then
Page_Loaded = True
End If
End Sub
And finally how do I block the popup that results from the submission of the form?
EDIT-- I put a breakpoint into the part that read the data (breakpoint at strHTML = ***). My code works excpet that upon form submission you get a popup and my code reads the popup not the form that I submited. If I run this and close the popup manually when the breakpoint is hit I get the correct data. So I guess the critical thing in addition to correctly figuring out when the pages are done is to figure out how to prevent the popup or to close it before reading in the data. I have read the first page of this thread dealing with popups but it confuses my small brain! help!
Hi All I am new to the broswer and the tutorial is great thanks! - Im using the VBA version which I assume is the same control as VB6. Just a quick issue - Im tying to create a versioning control software for Excel, that uses a web address to access an Excel file. Problem that I have is that when the webbrowser access a specified .xls document it opens the spreadsheet in the broswer itself not requesting the user to download the file. Im still new to the control and cant find how to force the control to download the file rather than just display it in the actual webbrowser, any help would be great!
@ MrDavidThorn: Welcome to the VBForums! :)
New codes (attachments below)
Fixes:
Hyperlink in new window fixed
Popup block fixed
Back & Forward button enable fixed
Status fixed
Unfixed:
None as of now :-D
Enjoy my new project. Feel free to rename the objects/program name if desired, and to fix the version number, go to: Project > Project1 Properties...
Make tab, type in a desired number (Integers only), click OK, save every form project, and the project, make an EXE, make an installation project from Start > Programs (All Programs for others) > Microsoft Visual Studio 6.0 > Microsoft Visual Studio 6.0 Tools > Package & Deployment Wizard
Follow the instructions, burn the files to a CD, install the program on other machines.
Next project might contain the Full Screen option & Windows Updates (Windows 95 & Higher only)
edit: to go onto the last visited site, remove the "Visited: Username@" line from the Text box, and click Go, but select the "Visited History" from the drop-down menu, click Get Cache, and select the site that you visited last. :)
Thanks for the cool tutorial I am learning a lot form it to make my own little browser thanks agian. keep up the good work
Hy guys I had a problem with that code in webbrowser tutorial
I need use a webbrowser with one single window. Then I used the example
"Open in new window
VB Code:
'This to open a new window with our browser.Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)Dim frm As Form1Set frm = New Form1Set ppDisp = frm.WebBrowser1.Objectfrm.ShowEnd Sub "
However if i click on link that open in other window the browser show a blank page. It cant open any link with new page
Can someone help me?
I am a bit confused on the progress bar,
When it says: If progress = -1 then progressbar1.value =...
What is Progress refering to?
Very useful. Thank all.
Hi,
how can I make Tabs in this web browser??
Hi,
I am trying to use the WebControl in VB6 as an activeX which I put in a cab file and then display in a html page.
Only problem is that I am not able to get to the URL of the current page :
locationURL does not work and documentCompleted does not run as I describe in http://www.vbforums.com/showthread.p...54#post3748554
Can somebody help me with this.
Thanks !
Hey,
Have a look here:
http://www.vbforums.com/showthread.php?t=506103
Gary
Hi Gary,
Thanks for the reply !
The problem here is I am using vb 6 and I am running an activeX in IE. When I use the activeX I created in a vb 6 desktop client all works well. But in the browser it does not.
I do not think the link you send me does answer this or did I miss something?
Ronny,
I was replying to the question from smith carlos regarding a .Net version, which is shown in the link that I posted.
Sorry, I have no idea about your question, I don't do VB 6 :)
Gary
Dear Sir,
Today only i visited this forum and found it very useful.
I know programming in VB6, and currently facing a problem.
The problem is that i want to open the link on my webbrowser control in in a new window.
If i am using the right click > open in new window then i am able to catch it via..
But what i want is even if somebody click the left mouse button on a link, i shall be able to open it in a new window (with session maintained).Code:Private Sub wb_NewWindow2(index As Integer, ppDisp As Object, Cancel As Boolean)
........
.........
frmMain.wb(new_index).RegisterAsBrowser = True
Set ppDisp = frmMain.wb(new_index).Object
End Sub
Second thing is that i want to scroll the loaded page programatically (pagedown/pageup).
Is it possible to do the above two actions?
I can only give you a solution for your first question. Just use the following code:
so you can now navigate to a site (e.g. google.com) by using:Code:Option Explicit
Enum BrowserNavConstants
navOpenInNewWindow = 1
navNoHistory = 2
navNoReadFromCache = 4
navNoWriteToCache = 8
navAllowAutosearch = 16
navBrowserBar = 32
navHyperlink = 64
navEnforceRestricted = 128
navNewWindowsManaged = 256
navUntrustedForDownload = 512
navTrustedForActiveX = 1024
navOpenInNewTab = 2048
navOpenInBackgroundTab = 4096
navKeepWordWheelText = 8192
navVirtualTab = 16384
navBlockRedirectsXDomain = 32768
navOpenNewForegroundTab = 65536
End Enum
WebBrowser1.navigate "www.google.com", 1
I can't give you an answer for your second question.
Does anybody know where I can find either an opera browser control, a google chrome control, a good non-glitchy firefox control, or just adding security to the standard IE control? i have a firefox control already but it is probably the worst thing i have ever had to deal with so i think i need a different thing. oh and also a bookmarks thing. that would be great.
Hi!
I would like to ask for a little help with this feature. It works great, but doesnt do everything what i really need. I want monitor every page's source code. But this code monitors only the page, what you typed in Combo1. After i click on the loaded page navigate to an other --> the source -Form1.browser.Document.documentElement.innerHTML- doesnt change. If i type other adress, it creates a new innerHTML. Hope, i could wrote my problem well..
So my question is: how can i monitor every page's source code
Thank you in advance
is there a code to load a saved page? if someone could post it, that'd be great.
You should ask your questions in the main forum. I think you will get better responces there.
Thnks you your oppertunity this is my first question reply you code gose here
Code:If KeyAscii = vbKeyReturn Then
Command1_Click
End If
i'm sorry but will it be applied for the case of other search engines.How?
MSWindowsUser, I don't really need the attachment as mine came with it and i run 6.0 However, Nelton, I have made a Web Browser, Not with the timer or notes, but it does have searchbox..I have another with a history box. though i dont no why, but to add stuff to it, you need to highlight it all blue, and press backspace (erase key) for it to add... If anyone can give me code so it automaticly adds, then thanks!
Thanks all the friends of vbforums
Hi All... i've nearly finished building a web browser using visual studio 2005, but i'm just having trouble displaying the url of the current page displayed in the web browser control!
i.e
urltxtbox1.text = WebBrowser1. ?????
Can anyone please help me....
Thanking you in advance...
Hello. Are you talking about when displaying the title of the site e.g. www.google.com - Google (title bar)? or the StatusBar e.g. Loading www.google.com/ladidadid Done?
Hi MSWindowsUser,
What I'm trying to do is to keep the current page URL displayed in a separate textbox, so that when I browse back and fro with the navigate buttons then the textbox changes with the webbrowser control if that makes any sense?! I basically need the code to read the URL for the current page that is displayed in the web browser?!?!
Thanks for your prompt response!!
this agood tutorial and it's agood work
but, in my project i need to using search engine such as google or yahoo to search about any subject and then i need to store only html and pdf documents to hard disk , can any one known me how do that programatically, please answer me?
Hello, how to you loop through all elements (input, select textarea etc) of a form and fill them?
See post #91
Hi, I'm new here. I know how to make a web browser in VB 2010 but I don't know how to let it access IP address like 192.168.1.1 or else. Please help me...
Hello silveraero,
Welcome to the forums!
Can you please provide more information about what you are trying to achieve? Are you saying that you want to restrict access to a site based on the client IP address, or are you saying that you want your web browser to be able to access a website that is hosted on 192.168.1.1. If it is the latter, then it should simply be a case of navigating to http://192.168.1.1.
Gary
Sorry, it's double post. Thank you very much. Solved it.
I'm design a web base application. Here is the description: I have an Android phone and I installed a wifi transfer application. I build this application as an file transfer center, you know, like PC suite or sync ... (my country is not using English as main language so sorry for my bad English).
What I want to as is how can I list the phone that using the wifi transfer application so I just need to choose in the list to transfer?
And, when I resize the form, the right align control will not realign to the border and stay still. Here is my solution for this:
[qupte]Private Sub Main_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
cbPort.Top = 15
cbIP.Top = 15
cmdBack.Top = 10
cmdForward.Top = 10
cmdHome.Top = 10
cmdStop.Top = 10
cmdGo.Top = 10
cmdStop.Left = Me.Width - cmdStop.Width - 40
cmdGo.Left = Me.Width - (cmdStop.Width) * 2 - 45
cbPort.Left = Me.Width - (cmdStop.Width) * 2 - 50 - cbPort.Width
cbIP.Width = Me.Width - (cmdBack.Width) * 5 - cbPort.Width - 90
End Sub
[/quote]
I just think about the controls size and scale. Does anyone have better solution?
Attachment 109145
this is the browser I created you can download the sample if you want
here - < link removed by moderator >
Welcome to VBForums :wave:
I have removed your link to protect our members, because we have no way of knowing what an executable file actually does - which could include something malicious, such as if there is a virus on your computer.
Feel free to post the code in an attachment (without executable files). You can do that by putting the files into a zip file, and when posting click on the "Go advanced", then "Manage attachments"