Solved

Using the WebBrowser Control with Visual Basic 6

Posted on 2001-06-21
13
213 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:ryancrawcour
Comment Utility
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
Comment Utility
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
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:cmgarnett
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now