Wednesday, October 9, 2013

Messagebox Yes No button

REM - confirmation from user;
&n_Check = WinMessage(MsgGetText(0, 0, "Content can not be changed once saved. Do you want to Continue?"), 4);

If &n_Check <> 6 Then
   /* Cancel save */
   MessageBox(0, " ", 20000, 6, "Your content has not been saved");
End-If;


-------------------

&re = WinMessage(&job_SWHA, 1);

0 gives you 'OK'
1 gives you 'OK' and 'Cancel'
2 gives you 'Abort', 'Retry', and 'Ignore'
3 gives you 'Yes', 'No' and 'Cancel'
4 gives you 'Yes' and 'No'
5 gives you 'Retry' and 'Cancel'

The value of &re gives you which button user has selected. 

No comments:

Post a Comment