掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
messageDlgについて (ID:6238)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
以前D2で作ったような気がしたので、探してD6用に直してみました。 function MsgDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; DefBtn: TMsgDlgBtn): Integer; const ButtonNames: array[TMsgDlgBtn] of string = ('Yes','No','OK','Cancel', 'Abort','Retry','Ignore','All','NoToAll','YesToAll','Help'); begin with CreateMessageDialog(Msg,DlgType,Buttons) do begin try HelpContext := 0; if DefBtn in Buttons then ActiveControl := FindComponent(ButtonNames[DefBtn]) as TWinControl; Result := ShowModal; finally Free; end; end; end; procedure TForm1.Button1Click(Sender: TObject); begin if MsgDlg('ほんとにいいの?',mtConfirmation, [mbYes,mbCancel,mbNo],mbCancel)=mrYes then MsgDlg('ほんとに?',mtConfirmation, [mbYes,mbCancel,mbNo],mbNo); end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.