It’s quite simple. Create a window that acts as your pop up. Call it MyMsgBox or whatever. Make sure it is not intrinsic.
Now add a function to the window called RunDialog. Add a property to the Window called RetVal and set it to type integer or whatever you want. Here is example code for the method
Public Function RunDialog(TheMessage as String) as Integer
TextField1.Text = TheMessage
Self.ShowModal
Return RetVal
End Sub
So Textfield1 is on your window. RetVal is set by whatever button is pressed to close the window. You set things up like this:
Dim w as New MyMsgBox
Dim MyVal as Integer = w.RunDialog(“This is some Text.”)
It’s that simple. Now you can make the window look however you want.
Sent from my iPhone
Post by donJPost by MarnaudPost by Jon OgdenYou might be able to do something more with MessageDialog. Not sure though.
Since you can’t obtain it’s handle, I don’t think you can do much. Creating a custom one is trivial, however.
Is it trivial?
i = MyWindow.ShowModal
??
I suppose I could set a property on the window that called it.
Thank you for the idea.
Don
To unsubscribe, email ***@xojo.com