;
Canvas.Font.Style := [fsBold];
Canvas.Font.Color := clRed;
Canvas.Brush.Color := clWhite;
..] of Char;
rect: TRect;
str: string;
begin
{获取}
GetKeyNameText(msg.KeyData, buf, Length(buf));
{画出来}
str := buf;
rect := ClientRect;
Canvas.FillRect(rect);
Canvas.TextRect(rect, str, [tfSingleLine, tfCenter, tfVerticalCenter]);
inherited;
end;
end.