Como fazer um Hot Link

 

Adicione um componente com o URL. Digite o seguinte código no seu evento OnClick:

 

procedure Tform1.URLLabelClick(Sender: TObject);

var

  TempString : array[0..79] of char;

begin

  StrPCopy(TempString,URLLabel.Caption);

  OpenObject(TempString);

end;

 

Insira a seguinte procedure logo após implementation:

 

{ Adicione "ShellAPI" no uses }

procedure TTOKAboutBox.OpenObject(sObjectPath : PChar);

begin

 ShellExecute(0, nil, sObjectPath, nil, nil, SW_NORMAL);

end;