Делаем Label как ссылку
Объявления:
procedure Label4Click(Sender: TObject); protected procedure WndProc( var Message : TMessage); override; |
Определения:
procedure TAboutBox . WndProc( var Message : TMessage); begin if Message . LParam = Longint (Label4) then begin if (Message . Msg = CM_MOUSELEAVE) then begin Label4 . Font . Color := clWindowText; Label4 . Font . Style := Label4 . Font . Style - [fsUnderline]; end ; if (Message . Msg = CM_MOUSEENTER) then begin Label4 . Font . Color := clBlue; Label4 . Font . Style := Label4 . Font . Style + [fsUnderline]; end ; end ; inherited WndProc(Message); end ; procedure TAboutBox . Label4Click(Sender: TObject); begin ShellExecute(MainFrm . Handle, 'open' , PChar ( SW_SHOWNORMAL) end ; |
Понятное дело, измените Label4 на имя Вашей метки.
Комментарии