本文整理自网络,侵删。
type
TAutoPlayForm = class(TForm)
chkNoAutoPlay: TCheckBox;
procedure FormCreate(Sender: TObject) ;
private
procedure WindowProcedure(var Msg : TMessage) ;
end;
var
AutoPlayForm: TAutoPlayForm;
Message_QueryCancelAutoPlay : Cardinal;
implementation
{$R *.dfm}
procedure TAutoPlayForm.WindowProcedure(var Msg: TMessage) ;
begin
if (Message_QueryCancelAutoPlay = Msg.Msg) then
begin
if chkNoAutoPlay.Checked then
Msg.Result := 1 //disable auto-play
else
// www.delphitop.com
Msg.Result := 0; //enable auto-play
end
else
inherited WndProc (Msg) ;
end;
procedure TAutoPlayForm.FormCreate(Sender: TObject) ;
begin
Self.WindowProc := WindowProcedure;
Message_QueryCancelAutoPlay := RegisterWindowMessage('QueryCancelAutoPlay') ;
end;
相关阅读 >>
Delphi 让combobox只允许输入数字和回车键以及Delphi key值表
Delphi xe5 android实现繁体字到简体字的转换函数
更多相关阅读请进入《Delphi》频道 >>