Slighthaze = [color blue]NULL[/color]
[img http://www.sweetpotatosoftware.com/ttimages/hyperlinks.gif]
Ever wanted to have hyperlinks on a form or in your application's About box? Well this example shows you one way to accomplish this using two ordinary labels and the ShellExecute API call (go to http://www.ml-consult.demon.co.uk/foxst-26.htm for more information on this API function). When the Email Us label is clicked it will bring up the user's default email client. When the Visit Our Website label is clicked it will bring up the user's default web browser. I have also added effects to the labels so that they act very similar to what you see on a webpage. You could use the _hyperlink.vcx to accomplish something similar to this example, but why bother? (CUT-N-PASTE the code below into a prg file and run it within VFP)
PUBLIC oForm
oForm = CREATEOBJECT("clswebemail")
oForm.show()
DEFINE CLASS clswebemail AS form
Top = 0
Left = 0
Height = 139
Width = 214
DoCreate = .T.
Caption = "FORM HYPERLINKS"
Name = "clswebemail"
Backcolor = RGB(255,255,255)
LOCAL cEmail
*!* Replace the email addy below with a valid one
cEmail = "mailto:somewhere@somehost.com"+;
"?Subject= Testing ShellExecute For Email"+;
"&Body= Hello World!"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.