Sub Button1_Click
'This needs to wait until I press 'OK'.
ShowMessageBox("Test","","","OK","")
'.....now do something as the OK button has been pressed......
End Sub
Sub ShowMessageBox(Message As String,Title As String,CancelButtonText As String,PositiveButtonText As String,NegativeButtonText As String)
DialogPanel = XUI.CreatePanel("")
Dim ScreenWidth As Float = PageRoot.RootPanel.Width
DialogPanel.SetLayoutAnimated(0, 0, 0,ScreenWidth/2, 180dip)
DialogPanel.LoadLayout("frmCustomMessageBox")
Dim lblMessage As Label = DialogPanel.GetView(0) 'Get the Message Label.
lblMessage.Text = Message
Dialog2.Title = Title
Dim rs As ResumableSub = Dialog2.ShowCustom(DialogPanel,PositiveButtonText,NegativeButtonText,CancelButtonText)
Wait For (rs) Complete (Result As Int)
End Sub