Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a HyperLink on a form without using API Calls

Status
Not open for further replies.

cvl75

Programmer
Mar 8, 2002
19
US
Please response ASAP.

Thank You Much In Advance

 
hi try the following code on Click event of any control

' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator.

This uses the Shell function in VB to open any exe.
Hope this is what u looking for

Regards
Niraj [noevil]
 
That's not what I am looking for. I am looking for a web browser Hyperlink, not an exe.

Thank you for your repsonse though.
 
Look up ShellExecute in help. There will, I'm sure be a good example. What you need to do is to ShellExecute your htm file. This will start up whatever browser you have a default, and show the page, whether local or Internet Peter Meachem
peter@accuflight.com

Support Joanna's Bikeathon
 
The way I do it is to hava a label, then in its on click event have:

ShellExecute me.hwnd, "open", "Link Address", vbNullstring, vbNullstring, sw_shownormal

And set the label to blue and underlined or whatever (I also set the Mousepointer property of the label to a pointy hand).

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top