>I'm trying to figure out how to use a FFC Hyperlink Label class to provide a MAILTO link on a form (e.g., 'mailto:
fred@splat.com'). The problem is that the class seems to prepend 'http://' to the font of the URL if it isn't already there, which makes the browser ignore the 'MAILTO' part.
>
>Can this not be done with Hyperlink Label, or am I perhaps not setting something correctly?
>
>-- jas
I think the FFC Hyperlink class is pretty geared toward URLs. You can create your own hyperlink label class pretty easily though. Just create a subclass of your label class and add a new property called HREF. Then in the click event of the label, put some code like this:
lcHREF = IIF(EMPTY(THIS.HREF), THIS.Caption, THIS.HREF)
IF EMPTY(lcHREF)
RETURN
ENDIF
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
=ShellExecute(0,"Open",lcHREF,"","",1)
This label will work with any string that can be executed with Shellexecute; it doesn't assume any http or mailto or anything. You just need to assure that the href property (or the caption if you want to show the address) contains the correct string.
Erik Moore
Clientelligence