Friends who have used Winamp know that there are some hyperlinks in Winamp's interface, you can take you directly to its related websites. The following example has implemented this feature. When the mouse click on the imitation hyperlink, you will reach the "Computer Business Intelligence" website: New Application, add a TLABEL component named Label1 on the form Form1 , Then add the following code in the code editor:
Void __fastcall tform1 :: formcreate (TOBJECT * SENDER)
{
Label1 → cursor = crhandpoint;
Label1 → Font → Color = CLBLUE;
Label1 → Font → Style = label1 → font → style } Void __fastcall tform1 :: label1click (Tobject * Sender) { Shellexecute (Handle, NULL, Label1 → CAPTION.C_STR (), NULL, NULL, SW_SHOWNORMAL); } Void __fastcall tform1 :: label1mousemove (Tobject * Sender, TshiftState Shift, Int X, Int Y) { Label1 → Font → Color = CLRED; } Void __fastcall tform1 :: formousemove (Tobject * Sender, TshiftState Shift, Int x, int y) { Label1 → Font → Color = CLBLUE; } Note: This example should contain header files. = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - // __________ / lb / ___ Outinn / _ [] _ / ____ / / / _________ / | () | / __ / Http://outinn.yeah.net/ | ____ / - | __ | - / | Welcome to Visit Outinn! | __ | == | ___ | || | __ | - = - = - = - | _ || _ | = - FANCY, Outinn@china.com