Wait For (rs) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
Dim num(3) As Int
num(0)=B4Xlbl(0).text :num(1)=B4Xlbl(1).text :num(2)=B4Xedt.text
If num(0)+num(1)=num(2) Then
Dialog.OverlayColor = 0xFF109419
Dialog.Title = "Congratulations"
Dialog.Show($"${num(0)} + ${num(1)} = ${num(2)} ${TAB} ${TAB} is the correct addition answer"$, "Ok", "", "")
'Here it does not wait for the Ok button to be clicked. Does not display the message. BAD
btnSignature_Click
Else
level=0
Dialog.OverlayColor = XUI.Color_Red
Dialog.Title = "Sorry"
Dialog.Show($"${num(0)} + ${num(1)} = ${num(2)} ${TAB} ${TAB} is the wrong addition answer"$, "Ok", "", "")
'Here it waits for the Ok button to be clicked. GOOD
Return
End If
End If