PDA

View Full Version : Msgbox & Alert ... any others.



marcuslee
22-11-2009, 17:48
Are there any other automatic ways to send a message to the user? I know there are the console_print commands. What I am referring to is output not dependant on console or custom GUI, such as the message box and the alert box. I'm getting ready to add an entry in the tutorial covering the message box and alert. I just wanted to make sure I am not missing any other ways.


Thanks,




Mark

Petr Schreiber
22-11-2009, 18:25
Hi Mark,

if by "automatic" you mean single command to display message, than I don't think there are any more.
Alert and MsgBox are quite similar - both have time out.

Alert, and that is not documented (will be in next release, if Eros reads this :)), returns:
-3 when time outed
-2 when clicked before time out


Petr

marcuslee
22-11-2009, 18:39
Alert, and that is not documented (will be in next release, if Eros reads this :)), returns:
-3 when time outed
-2 when clicked before time out


So, that sounds like program decisions can be made based upon whether the user or the program shuts off the alert. Is that what you're saying?


Mark

Petr Schreiber
22-11-2009, 20:02
Yes, it can.

But msgBox can return values too - %IDYES, %IDNO, %IDCANCEL...



Dim result As Long
result = MsgBox(0, "Press button", %MB_YESNOCANCEL, "Result test")

Select Case result

Case %IDYES
MsgBox(0, "Yes pressed")

Case %IDNO
MsgBox(0, "No pressed")

Case %IDCANCEL
MsgBox(0, "Cancel pressed")

End Select

ErosOlmi
22-11-2009, 21:05
Alert, and that is not documented (will be in next release, if Eros reads this :)), returns:
-3 when time outed
-2 when clicked before time out


Of course it will be in next release. Possible values returned by Alert:
-1: Alert box was closed by pressing "X" on the dialog
-2: Alert box was closed by clicking on the label
-3: Alert box was closed due to timeout