B4X:
Private Sub Button2_Click
'old
' Dim res As Int = fx.Msgbox2(MainForm, "Do you want to save changes?", "Save Data", "Yes", "Cancel", "No", fx.MSGBOX_WARNING)
' If res = fx.DialogResponse.POSITIVE Then
' Log("Saving changes...")
' End If
'-------------------------------------------------------------------------------------
'new
Dim res As Object= xui.Msgbox2Async("Do you want to save changes?","Save Data","Yes","Cancel","No", fx.MSGBOX_WARNING )
Wait For (res) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log("Saving changes...")
End If
End Sub