Dazu musst Du OwnerDraw des Hauptmenüs auf True setzen und dann
jedes Menüelement neu dimensionieren und zeichnen (TMenuItem.OnDrawItem, OnMeasureItem):
Delphi-Quellcode:
procedure TForm1.MenuDrawItem(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; Selected: Boolean);
begin
ACanvas.Font.Name := 'Verdana';
ACanvas.Font.Size := 15;
ARect.Left := 4;
DrawText(ACanvas.Handle, PChar(TMenuItem(Sender).Caption), -1, ARect, DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOCLIP);
end;
procedure TForm1.MenuMeasureItem(Sender: TObject;
ACanvas: TCanvas; var Width, Height: Integer);
var
Size : TSize;
begin
ACanvas.Font.Name := 'Verdana';
ACanvas.Font.Size := 15;
Size := ACanvas.TextExtent(StripHotkey(TMenuItem(Sender).Caption));
Width := Size.cx;
Height := Size.cy;
end;