Solved

Using the WebBrowser Control with Visual Basic 6

Posted on 2001-06-21
13
231 Views
Last Modified: 2013-11-25
Hello all,

i would like to implement a browser within my application. i have some online help stuff that i would like displayed similar to the help provided with MSDN. this is simply a browser with control taken over how the browser operates. i would like the same level of control.

what would be the best way to do this ?
does IE need to be installed on the machine before i can use the WebBrowser control ?

any ideas on the best way to accomplish this ?
0
Comment
Question by:ryancrawcour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +4
13 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6214100
Internet Explorer is only a plain wrapper around the webbrowser control. The webbrowser control is the actual control that is able to show the html pages. If you can use the WebBrowser control it does not necessarily mean that IE is installed.

The best way would be the WebBrowser control....:-/...

what exactly are your questions?

regards,
CJ
0
 
LVL 3

Expert Comment

by:cmgarnett
ID: 6214237
With a web browser control on your form and

WebBrowser1.Navigate ("www.microsoft.com")

in your form load event, you will see the microsoft page. You can then navigate around using the page's links.
0
 
LVL 3

Expert Comment

by:cmgarnett
ID: 6214253
Right clicking on the browser control gives you forwards and backwards control if you want it.

A list box with your help topics in it could be used to provide the URLs and then you can use

WebBrowser1.Navigate(ListItemURL)
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:ryancrawcour
ID: 6214318
i have a web application that i would like to run within an environment that i have coimplete control over. ie. i do not want the user to access any of the menu items ot address box etc.

does ie5.5 need to be installed on the machine before i can use this control ? or is there a re-distributable version ?

0
 
LVL 5

Expert Comment

by:rkot2000
ID: 6214359
if it's web application you can try to use javascript or vb script to control ie : something like this :
newwindow=window.open("main.asp?" + lvsquery ,null ,"height=500, width=700, status=no, toolbar=no, titlebar=no, menubar=no, location=no, resizable=yes");

if you want to use vb : start a new project vb, select project and choose add form locate WebBrowser form.

0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6214379
Once you are done creating your application, you can use the Package & Deployment wizard (comes with visual studio) to create an installer. The installer will add every control (including the webbrowser control) to the package. Once it is going to install it will check whether it is already on the target system or not,...

regards,
CJ
0
 
LVL 3

Expert Comment

by:cmgarnett
ID: 6214433
The webbrowser control provides you with fewer facilities than internet explorer.

WebBrowser.AddressBar = False - Stops the address bar from showing

WebBrowser.Navigate("URL") - Goes to a particular page.

WebBrowser.GoBack - Goes back a page.
WebBrowser.GoForward - Goes forwards if possible.

Put the go back and forward methods behind your command buttons and you should be away.
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6214763
On distributing the webbrowser control - unfortunately according to MS you have to distribute IE in order to distribute this control, and I'd agree that this is safer. They don't really care who distributes it (so it gets on more client PCs) and you can get a license from them very easily if you have a search around their site.
0
 

Author Comment

by:ryancrawcour
ID: 6214938
the thing that worries me is that we plan on releasing this application into an evironment where Netscape is the corporate choice for browser software. our application has been written to make use of thing like behaviors etc which Netscape will not support.

previously it has not been an issue because we simply install IE in the environment and then run our application. however at this particular site they want their users to continue using netscape and as their access to netscape and sites is controlled by login scripts etc. they do not want us to release IE which the users can then use freely.

they are quite happy however if we install components that will allow our app to run in a controlled environment.

so what i was planning on doing was to write a simple exe with one form containing a WebBrowser control. when this exe is run it will load our web app and nothing else.

is this possible ?

0
 
LVL 6

Expert Comment

by:andyclap
ID: 6215077
Unfortunately not - it seems to be an all-or-nothing approach to IE redistribution.
Don't you just love behaviours? Don't you just hate netscrap and client sites which insist on using this terrible browser?
0
 

Author Comment

by:ryancrawcour
ID: 6215122
yeah i do hate people that insist on using something that is way behind ... but that is another entirely different debate.

unfortunately this client site is worth a LOT of money to me. and either i recode everything not to use behaviors or i find a way to convince them that IE is the way to go.

however considering the company i very much doubt that they would embrace Microsoft technologies with open arms.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7139634
Hi ryancrawcour,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept CJ_S's comment(s) as an answer.

ryancrawcour, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7173230
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question