Not in a msgbox, but you could create your own. It’s not uncommon to see that as part of an action button on a dialog using the MessageDialog class:
[code]Function Alert(Type as AlertTypes, Title as string, msg as string, btn1txt as string, btn2txt as string, btn3txt as string, w as window = nil) As integer
Dim d as New MessageDialog //declare the MessageDialog object
Dim b as MessageDialogButton //for handling the result
select case Type
case AlertTypes.kCaution
d.icon=MessageDialog.GraphicCaution //display warning icon
case AlertTypes.kNote
d.icon = MessageDialog.GraphicNote
case AlertTypes.kStop
d.icon = MessageDialog.GraphicStop
case AlertTypes.kPlain
d.icon = MessageDialog.GraphicNone
case AlertTypes.kQuestion
d.icon = MessageDialog.GraphicQuestion
end
d.ActionButton.Caption= btn1txt
if btn2txt <> “” then
d.CancelButton.Visible= True //show the Cancel button
d.CancelButton.Caption = btn2txt
else
d.CancelButton.Visible = false
end
if btn3txt <> “” then
d.AlternateActionButton.Visible= True //show the “Don’t Save” button
d.AlternateActionButton.Caption = btn3txt
else
d.AlternateActionButton.Visible = false
end
d.Message = Title
d.Explanation = msg
if w = nil or TargetWin32 then
b=d.ShowModal //display the dialog
else
b = d.ShowModalWithin( w.trueWindow )
end
Select Case b //determine which button was pressed.
Case d.ActionButton
return 1
Case d.AlternateActionButton
return 3
Case d.CancelButton
return 2
End select
End Function
[/code]
Usage would then be something like this:
[code]dim iResp as integer
iResp = Alert(AlertType.Question, “Upgrade Available”, “This is a message”, “Continue”, “Don’t Remind Me Again”, “Go to Website”, self)
Select case iRes
case 0 //Continue
//Ignore
case 1 //Don’t Remind me again
//Do something.
case 2 //Go to Website
showers “www.example.com”
end
[/code]