MsgBox2 options

MDEnt

Member
Licensed User
Longtime User
Is it possible to add three buttons on the back Keycode such as: Quit, Cancel, Restart in a MsgBox(2)?

Quit - would quit the application
Cancel - would return the user to the previous screen
Restart - would return the user to a specific view

I'm using the below as a starting point: All is working well as is - but cancel/no are almost the same thing and would like to replace one with a restart instead. I've tried modifying a few ways with no luck.

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
If Msgbox2("Do you want to close?", "", "Yes", "Cancel", "No", Null) = DialogResponse.POSITIVE Then
Return False
Else
Return True
End If
End If
End Sub


Thanks!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…