Solved

Hyperlinks in VB

Posted on 2000-03-21
4
298 Views
Last Modified: 2010-05-02
How do I place a hyperlink on a VB 5.0 form so that when the user clicks on it, it loads up IE with that page?
0
Comment
Question by:A_Tucker
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 2642021
VB doesn't know from hyperlinks. You can have a command button or other control that fires off IE in response to the click event.

But more elegantly you can use the WebBrowser control on your form to add a browser window within your application. This gives you full control over what buttons are implemented. We do this to give our folx a limited functionality browser that doesn't have a URL line where they can type. By setting the starting point to our corporate intranet we can completely limit where they browse to.

M
0
 
LVL 1

Expert Comment

by:pclement
ID: 2642057
Take a look at the HyperJmp and HyperLabel samples at:

http://www.mvps.org/vb/
0
 
LVL 6

Expert Comment

by:st_steve
ID: 2642096
if time is a constraint, do what "mark2150" has said first....just kick off IE from your application (using ShellExecute; so that you won't have to hard-code the IE application name in your VB)

In my opinion, it is close to impossible to block off all possible URL addresses that the users might navigate to....coz Internet is huge AND it's growing as well....we'll probably need a large database of URL addresses to check against. But anyway....some of the software already do that...I can't think of the names right now...but there are software out there to block off specific web addresses..
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2642551
st_steve, it's called a firewall aka proxy server. Squid makes one that you can get for free. Build it out on a Linux box and you can control to a nicity where the users go to. You can have it operate in either Permissive or Restrictive mode. Permissive allows users to visit all of the internet *except* sites listed. Restrictive forbids users to vist any of the internet *except* those sites specifically enabled.

But if you want to limit your folx to the corporate intranet the WebBrowser is a simple and relatively foolproof solution. Since the browsers home page is under your control, you always know where they start. Since there is no URL entry field (unless you decide to code one) there is no way for them to enter a random liny. Since you control the home page they can only follow the links you establish. If you don't link outside your internal pages, they can't go ANYWHERE.

M
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

730 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