Unit ASURLLabel

Renamed from MDURLLabel.pas 6/14/1998 to reflect changes made by Alek Shamrai. mdURLLabel // © Copyright 1997 by Martin Djernæs // .................................................................. 25 May 1997 - MD : Initial Date 26 May 1997 - MD : Version 1.0 28 May 1997 - MD : + support for mailto (note : It can not detect if a mailto device is available) % resource file extension changed to crs (Cursor ReSource) while my Delphi kept filling a MAINICON in to my resource file while making a dll. 3 June 1997 - MD : + Detects now if MAPI is installed on the computer (used for mailto commands) + The Caption property is made public (read only) + Check of URL type ("@" = e-mail "/" = web link) + Ignore mailto: and http:// prefixes written in the URL property 4 June 1997 - MD : Version 1.1 13 June 1997 - MD : % Two exits is removed from the "GetProgramPathFromExt", they was unneccessary - (thanks Maurice Valmont) 15 June 1997 - MD : % Use of PChar and StrAlloc is substituted with use of AnsiString (makes things easier to read) - (thanks Maurice Valmont) 5 November 1997 - MD : % Caption is made read/write + URLAsHint offer the option of getting a hint containing the URL propery, as hint so behaviour like most browsers can be made + Function GetURLCaption offered to get the wanted URL (incl/excl the prefix). 5 November 1997 - MD : Version 1.2 ..................................................................

Classes

TmdURLLabel -

Functions

GetProgramPathFromExt - xxx $R mdURLLabel.
Register - Procedure TmdURLLabel.

Types

TmdLabelType
TmdLinkType

Constants

defMailto
defURL

Variables


Functions


Function GetProgramPathFromExt(Const Ext : String) : String;

xxx $R mdURLLabel.crs} // Cursor ReSource (URL Cursor) // Pick a program from the registry associated with a extension

procedure Register;

Procedure TmdURLLabel.SetHint(Value : TCaption); Begin Inherited Hint := Value; end; Function TmdURLLabel.GetHint : TCaption; Begin FURLAsHint := False; // remove the property which "allows" the // the hint to be used as URL notify event! Result := Inherited Hint; end;

Types


TmdLabelType = (Auto, Passive, Link);

TmdLinkType = (http, mailto);

Constants

defMailto = 'person@server.dom'

defURL = 'www.homepage.my'

crURLCursor = 8888;

Variables