Private Sub Button1_Click
Wait For (ShowDialog) complete (result As Int)
If result = xui.DialogResponse_Cancel Then
Log("Cancel")
Else
Log("OK")
End If
' Additional Code Continues
Log("This should not happen if I don't reply to the warning")
End Sub
Sub ShowDialog As ResumableSub
Dim sf As Object = xui.Msgbox2Async("Delete file?", "Title", "Yes", "Cancel", "No", Null)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log("Deleted!!!")
End If
Return Result
End Sub