The following code calls the DisplayMessage method of the oMessage object to display a form message and compares the returned value to IDYES, which is the compile time constant for the Visual FoxPro message box Yes button return value.


IF _SCREEN.oApp.oMessage.DisplayMessage(“Do you want to remove this report/label?”,,“ “+ALLTRIM(cReportOrLabelName)) = IDYES


The  “ “+ALLTRIM(cReportOrLabelName) parameter adds the name of the report or label to the message.

Tip – Clearing a Status Bar Message: After displaying a status bar message, you can clear the status bar message with the code:


Tip – Clearing a Wait Window Message: After displaying a wait window message, you can clear it with the following code if the Nowait option is used:



Message Builder / Manager