下面的示例中显示了一个用户自定义对话框。标题“record not found.would you like to search again?”显示在用户自定义对话框中,标题栏中显示“my application”。用户自定义对话框含有“是”和“否”按钮以及问号图标。第二个按钮 (no) 为默认按钮。当选取一个按钮时,显示所选的内容。
cmessagetitle = 'my application'
cmessagetext = 'record not found. would you like to search again?'
ndialogtype = 4 + 32 + 256
* 4 = yes and no buttons
* 32 = question mark icon
* 256 = second button is default
nanswer = messagebox(cmessagetext, ndialogtype, cmessagetitle)
do case
case nanswer = 6
wait window 'you chose yes'
case nanswer = 7
wait window 'you chose no'
endcase