Sub Activity_Resume
If ShouldShowDialog Then
Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null, False)
Wait For Msgbox_Result (Result As Int)
HandleResult(Result)
End If
End Sub
Sub View_Click
ShouldShowDialog = True
Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null, False)
Wait For Msgbox_Result (Result As Int)
HandleResult(Result)
End Sub
Sub HandleResult(Result As Int)
ShouldShowDialog = False
' Paste code that handles the result here
End Sub