Solved

Using the WebBrowser Control with Visual Basic 6

Posted on 2001-06-21
13
219 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 71
Excel VBA, find a string in a column, update a cell 7 78
using web browser with BING 40 120
Windows ICD FFU Issue 4 38
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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