📄 ddhinpub.pas
字号:
unit DdhInpuB;
interface
{$R *.DCR}
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TDdhInputButton = class(TButton)
private
procedure WmChar (var Msg: TWMChar);
message wm_Char;
end;
procedure Register;
implementation
procedure TDdhInputButton.WmChar (var Msg: TWMChar);
var
Temp: String;
begin
if Char (Msg.CharCode) = #8 then
begin
// if backspace, remove last char
Temp := Caption;
Delete (Temp, Length (Temp), 1);
Caption := Temp;
end
else
// add the char
Caption := Caption + Char (Msg.CharCode);
end;
procedure Register;
begin
RegisterComponents('DDHB', [TDdhInputButton]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -