MsgYesNo

Moderator: Rathinagiri

Post Reply
asharpham
Posts: 55
Joined: Sat Mar 24, 2018 2:48 pm
DBs Used: DBF
Has thanked: 14 times

MsgYesNo

Post by asharpham » Tue Apr 10, 2018 9:56 am

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

User avatar
bpd2000
Posts: 999
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 150 times
Been thanked: 65 times

Post by bpd2000 » Tue Apr 10, 2018 10:12 am

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
BPD
Convert Dream into Reality through HMG

Post Reply