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
Solved

Hyperlinks in VB

Posted on 2000-03-21
4
296 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

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

839 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