Solved

Using the WebBrowser Control with Visual Basic 6

Posted on 2001-06-21
13
240 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

624 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