{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern Lucida Console;}}
{\colortbl\red0\green0\blue0;}
\deflang1031\pard\plain\f2\fs18 THyperLink component manual
\par Version 1.0
\par first release
\par 
\par Purpose:
\par ========
\par THyperLink is a TCustomLabel descendant which can display
\par any hyper link. There are some types predefined such as
\par http, telnet, news, email etc. The differences between
\par THyperLink and the other components which seemes to 
\par be very like THyperLink are:
\par 
\par *\tab You can add a custom service which is used by all 
\par \tab THyperLink components in the current application
\par * you can display either the address of the link or just
\par   an alias name.
\par * you can decide what hint or tooltip is displayed but
\par   you can also leave the hint property emtpy so that the
\par   link displays the current address automatically as hint
\par * the component executes automatically any application
\par   associated with the current service. The address will be
\par   sent directly to the Shell via the SellExecute function
\par * you can also use another custom based application and decide
\par   whether a click on the link is automatically executed or 
\par   not
\par * setable color for links and visited links. The color change
\par   will be automatically handled
\par   
\par Future plans and features:
\par ==========================
\par This depends very on you. Give me enough feedback, so I will
\par continue to spent my free time in enhancing this component.
\par You should send me suggestions and new ideas. There are some
\par features I think that were worth to be added but only if there
\par is any resonance from you:
\par 
\par \tab system wide handling of the visited state of all links in all
\par \tab applications (iexplorer like)
\par \tab 
\par \tab system wide handling of custom services
\par \tab 
\par \tab more than one additional custom service
\par   \tab 
\par   flags for executing another than the current associated
\par   application for the specified service
\par 
\par   ...
\par   
\par Copyright:
\par ==========
\par THyperLink source code and object and compiled units are Freeware 
\par for non commercial use only (!). If you want to use the component 
\par in commercial software you have to contact the author first and 
\par ask for special company conditions and package licenses.
\par The code of the demo application is freeware and distributed as
\par an coding example. I will not be responsible for any damage which
\par results from the use this code or component. the package is
\par provided as is.
\par I will only ask for a small note from any user which uses this 
\par component in his applications.
\par 
\par E-Mail:  hpgue@aol.com
\par Homepage: http://members.aol.com/hpgue/hpgintl.htm
\par 
\par If you want to change something in the class' source send me a copy
\par so I can be always up-to-date.
\par 
\par Supported platforms and requirements:
\par =====================================
\par THyperLink is available for Delphi 2.x++ and C++ Builder 1.x++.
\par the packages can be downloaded from my homepage see copyright.
\par You will need either Windows 95 or Win NT (new shell 4.x++).
\par Win32S I think will not work.
\par If you want to use THyperLink with Delphi 3.0 the initialization
\par code can be commented out.
\par 
\par Installation:
\par =============
\par C++ Builder:
\par \tab Copy the following files to your components directory:
\par \tab \tab cls_HyperLink.h
\par \tab \tab cls_HyperLink.cpp
\par \tab \tab cls_HyperLink.res
\par \tab \tab cls_HyperLink.dcr
\par \tab Select from the C++Builder's menu Component->Install. Enter cls_HyperLink
\par \tab and press Enter. Rebuild the library. Done.
\par \tab You should now have a new component tab 'HPG' with THyperLink on it.
\par 
\par Delphi:
\par \tab Copy the following files to your components directory:
\par \tab \tab cls_HyperLink.pas
\par \tab \tab cls_HyperLink.res
\par \tab \tab cls_HyperLink.dcr
\par \tab Select from the C++Builder's menu Component->Install. Enter cls_HyperLink
\par \tab and press Enter. Rebuild the library. Done.
\par \tab You should now have a new component tab 'HPG' with THyperLink on it.
\par 
\par Usage:
\par ======
\par cls_HyperLink provides most properties a TLabel also provides. Some are
\par quiet useless for the Link so I left it protected. I will here only describe
\par the additional properties that has been added
\par 
\par I use one manual for both Delphi and C++ Builder version of the component.
\par YES there are really two versions of the component not only a second compiler
\par run (!). So the properties are declared here 1st for Delphi and then for C++.
\par 
\par Properties:
\par -----------
\par 
\par PopupMenu
\par     property PopupMenu : TPopupMenu 
\par     __property TPopupMenu *PopupMenu
\par     
\par     Read and runtime only
\par     This gives you access to the ContextMenu of the THyperLink component. Currently
\par     this PopupMenu contains only one MenuItem 'Copy URL to Clipboard'. You can
\par     use the PopupMenu from your source code to add some custom items here
\par 
\par Alias
\par     property Alias : String
\par \tab   __property AnsiString Alias
\par 
\par \tab This is the string which will be displayed in the THyperLink. Leave this property
\par \tab blank the Address (property Caption) will be displayed instead
\par 
\par Caption
\par \tab property Caption : TCaption 
\par \tab __property TCaption Caption
\par \tab 
\par \tab This string is used to build the address whic is executed when the user clicks
\par \tab on the link. the address is built with the Service Prefix (property LinkType)
\par \tab and the Caption. If you specify no Alias the full address Prefix and Caption
\par \tab will be displayed.
\par 
\par LinkType
\par \tab   property LinkType : TLinkType 
\par \tab \tab __property TLinkType 
\par 
\par \tab \tab Defintion of TLinkType:
\par \tab \tab 
\par     TLinkType=(ltEmail,ltFile,ltGopher,ltHttp,ltNews,ltWais,ltTelnet,ltCustom); 
\par \tab \tab enum TLinkType
\par \tab \tab \{
\par \tab \tab \tab ltEmail,ltFile,ltGopher,ltHttp,ltNews,ltWais,ltTelnet,ltCustom
\par \tab \tab \};
\par \tab \tab 
\par \tab \tab LinkType specifies which Service Prefix the link uses. E.g. ltEmail uses the
\par \tab \tab Service Prefix "mailto:". If you set LinkType to ltCustom the CustomPrefix
\par \tab \tab will be used (see property CusotmPrefix)
\par 
\par LinkColor, VisitedColor
\par 
\par     property LinkColor : TColor 
\par     property VisitedColor : TColor 
\par     __property TColor LinkColor
\par     __property TColor VisitedColor
\par 
\par \tab \tab LinkColor is the Color of the THyperLink which will be displayed if the Visited
\par \tab \tab flag is set to false (default). If the user clicks on the link the visited flag 
\par \tab \tab will be changed (for default) to true and the VisitedColor property will then be
\par \tab \tab used for the THyperLink alias or caption.
\par 
\par Visited
\par \tab   property Visited : boolean
\par \tab \tab __property bool Visited
\par \tab \tab 
\par \tab \tab This flag decides which color will be used for the displayed text. Default this 
\par \tab \tab is set to false. If the user executed the link (see also Events section) this
\par \tab \tab flag is toggled to false and the VisitedColor property will be used
\par \tab \tab You can also set Visited at design and runtime manually
\par 
\par CustomPrefix
\par     property CustomPrefix : String
\par     __property AnsiString CustomPrefix
\par 
\par \tab \tab This string is used instead of the predefined Service Prefixes if you set the
\par \tab \tab LinkType to ltCustom. Set this to 'https://' and the link will automatically
\par \tab \tab execute the application which is associated with https:// service if any. All
\par \tab \tab THyperLink components of the current application share the same CustomPrefix
\par \tab \tab (only has an effect if their LinkType properties are set to ltCustom ;-)
\par 
\par Events:
\par -------
\par 
\par OnBeforeExecute
\par     property OnBeforeExecuted : TBeforeExecuteEvent
\par     __property TBeforeExecuteEvent OnBeforeExecuted
\par 
\par     TBeforeExecuteEvent=procedure (Sender: TObject;var ExecuteIt: boolean ) of object;
\par \tab typedef void __fastcall (__closure *TBeforeExecuteEvent)(System::TObject* Sender,
\par \tab \tab bool &ExecuteIt);
\par 
\par \tab This event occurs when the user clicks on the link first. All other events are
\par \tab fired after this event. If you set the ExecuteIt parameter to false the THyperLink
\par \tab will not be executed and no other event will be fired. Use this to temporary 
\par \tab disable the execution of the link.
\par 
\par OnExecute
\par     property OnExecute : TExecuteEvent 
\par     __property Cls_Hyperlink::TExecuteEvent 
\par 
\par     TExecuteEvent=procedure (Sender: TObject;var ExecuteIt: boolean ) of object;
\par \tab typedef void __fastcall (__closure *TExecuteEvent)(System::TObject* Sender,
\par \tab \tab bool &ExecuteIt);
\par 
\par \tab This event is fired if the user clicks on the link and no OnBeforeExecute 
\par \tab event is defined or the OnBeforeExecute event sets the ExecuteIt parameter
\par \tab to true (default). If you set the ExecuteIt parameter to false the ShellExecute
\par \tab function will not be called but the OnAfterExecute event will be fired, the
\par \tab Visited flag will be set to true and the VisitedColor will be used for the
\par \tab displayed text.
\par \tab Use this if you want to start another application for the link as the 
\par \tab currently associated one or to include a timeout function.
\par 
\par OnAfterExecute
\par     property OnAfterExecuted : TAfterExecuteEvent 
\par     __property TAfterExecuteEvent OnAfterExecuted
\par 
\par     TAfterExecuteEvent=procedure (Sender: TObject;Reslt: longint ) of object;
\par \tab typedef void __fastcall (__closure *TAfterExecuteEvent)(System::TObject* Sender,
\par \tab \tab long Result);
\par \tab 
\par \tab This occurs if the link has been executed or better when the function call to
\par \tab the WINAPI ShellExecute returns. The return code of the call is submitted in 
\par \tab the Result (Reslt) parameter. If you set the ExecuteIt paramater in the 
\par \tab OnExecute event to false the Result is always 33;
\par \tab If Result is smaller than 32 then an error occured and the kind of error can
\par \tab be retrieved with a call to the WINAPI function GetLastError()
\par \tab Use this to find out when the ShellExecute function returns or whether the
\par \tab function has been correctly worked.
\par \tab 
\par Remarks:
\par ========
\par The execution of the address is done via the WINAPI function ShellExecute. So
\par it is sure that the correct application is launched. The ShellExecute function
\par returns usually immediately. So you cannot be sure whether or not the URL 
\par (property Caption) can be successfully retrieved.
\par 
\par If you want to be more flexible in the decision which kind of application is 
\par launched by a specific Service Prefix use the OnExecute event and set ExecuteIt 
\par parameter to false. Start the new function manually. 
\par 
\par At initialization (startup function) the THyperLink function loads a custom 
\par cursor at Screen.Cursor[-21] which is done automatically in Delphi 3.x++. You 
\par can use this IconHand cursor in all moduls of your application with some
\par code like theses:
\par 
\par \tab \{DELPHI\}
\par \tab procedure TForm1.FormCreate(Sender : TObject);
\par \tab begin
\par \tab \tab Label1.Cursor:=Screen.Cursors[-21];
\par \tab end;
\par \tab 
\par \tab /*C++Builder*/
\par \tab void __fatscall TForm1.FormCreate(TObject *Sender)
\par \tab \{
\par \tab \tab Label1->Cursor=Screen->Cursors[-21];
\par \tab \}
\par 
\par Finally:
\par ========
\par 
\par Again: Send any suggestions, remarks, bugs, errors, ideas or something
\par else to
\par 
\par E-Mail: hpgue@aol.com
\par 
\par ___
\par 
\par   
\par }
 