unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    lblUnderline: TLabel;
    lblItalic: TLabel;
    Button1: TButton;
    cmbItalicBold: TButton;
    Label3: TLabel;
    procedure cmbItalicBoldMouseMove(Sender: TObject; Shift: TShiftState;
      X, Y: Integer);
    procedure lblItalicMouseEnter(Sender: TObject);
    procedure lblUnderlineMouseEnter(Sender: TObject);
    procedure lblUnderlineMouseLeave(Sender: TObject);
    procedure lblItalicMouseLeave(Sender: TObject);
    procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.cmbItalicBoldMouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
begin
  cmbItalicBold.Font.Style := [fsItalic, fsBold];
end;

procedure TForm1.lblItalicMouseEnter(Sender: TObject);
begin
  lblItalic.Font.Style := [fsItalic];
end;

procedure TForm1.lblUnderlineMouseEnter(Sender: TObject);
begin
  lblUnderline.Font.Style := [fsUnderline];
  lblUnderline.Font.Color := RGB(0, 0, 255);
end;

procedure TForm1.lblUnderlineMouseLeave(Sender: TObject);
begin
  lblUnderline.Font.Style := [];
  lblUnderline.Font.Color := RGB(0, 0, 0);
end;

procedure TForm1.lblItalicMouseLeave(Sender: TObject);
begin
  lblItalic.Font.Style := [];
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  cmbItalicBold.Font.Style := [];
end;

end.
