Page 1 of 1

MsgYesNo

Posted: Tue Apr 10, 2018 9:56 am
by asharpham
I'm struggling to understand how to use MsgYesNo. Can someone give me a couple of examples of how to correctly use it? Basically I want to confirm that the current record selected is to be deleted. I can't find anything in the samples and I haven't found the reference files very helpful.

Regards,
Alan

Re: MsgYesNo

Posted: Tue Apr 10, 2018 10:12 am
by bpd2000
It is very simple

Code: Select all

/* YesNo how to use
 * bpd2000
*/
#include "hmg.ch"

Function Main()

If MsgYesNo ( 'Are you sure to Go?' ) 
   // Yes selection related code
   Yes_No_Test()
  else
   // No selection related code / quit from operation
   No_Test()  
Endif


Return nil

Procedure Yes_No_Test()

    MsgInfo ( "You selected Yes", 'Selection_value' )

Return

Procedure No_Test()

    MsgInfo ( "You selected No", 'Selection_value' )

Return