掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
メッセージボックスのボタン名をカスタマイズするには? (ID:40532)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
同じくでDelphiですが。 unit てきとうなユニット; interface uses Dialogs; function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer; implementation uses Controls, Forms, StdCtrls; function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer; var dlg: TForm; i: Integer; begin dlg := CreateMessageDialog(Msg, DlgType, Buttons); try dlg.HelpContext := HelpCtx; dlg.Position := poScreenCenter; for i := 0 to dlg.ComponentCount -1 do begin if dlg.Components[i] is TButton and (TButton(dlg.Components[i]).ModalResult = mrCancel) then begin TButton(dlg.Components[i]).Caption := '強制停止'; Break; end; end; Result := dlg.ShowModal; finally dlg.Free; end; end; end.
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.