MsgBox

概要:

baMsgBoxはWindowsの標準的なメッセージボックスを表示します。

シンタックス: Result = baMsgBox( Message, Caption, Buttons, Icon, DefButton )

パラメータ:

#string, #string, #string, #string, #integer
Message 表示したいメッセージ。2行以上も可能です。
Caption タイトルバーに表示するキャプション。
Buttons 表示するボタンのタイプ。次のいずれかになります。
 "OK"
 "OKCancel"
 "RetryCancel"
 "AbortRetryIgnore"
 "YesNo"
 "YesNoCancel"
Icon 表示するアイコンのタイプ。次のいずれかになります。
 "Stop"
 "Information"
 "Question"
 "Exclamation"
 "NoIcon"
DefButton デフォルトで選択されているボタンの番号。ボタンの数に応じて1,2,3のいずれかになります。左側のボタンが1です。

戻り値:

#string
"OK"や"Ignore"など、クリックされたボタンの名前を返します。

例: Answer = baMsgBox( "Is this is a test message?", "A question" , "YesNo", "Question" , 1 )
if Answer = "Yes" then baMsgBox("Correct!" , "The answer", "OK", "Information", 1)


関連項目: baMsgBoxEx