***************************************************************************** * * Function: QMESS * * Parameters: lcMessage,lcFormOb * Returns: True * Variables: * : lcMessage The message string to be sent ****************************************************************************** *[99 * OVERVIEW of QMESS * uses wait window to print a quick message on the screen * converts any tilde ~ characters it finds to chr(13) * to help with formatting the output * If there is a field on the active form called qmess it will * output to that field instead * If it is a TOP Level form with no desktop visible you will have to provide an object reference and I dont know why *]99 Func qmess Lparam lcMessage,lcFormOb Local lcCommand,lcMessage,liforms,llsucess lcMessage=Strtran(lcMessage,'~ ','~') lcMessage=Strtran(lcMessage,'~',Chr(13)) *!* If type('_screen.activeform.qmess')='O' *!* _Screen.activeform.qmess.value=lcMessage *!* _Screen.activeform.qmess.refresh *!* ELSE If pcount()=2 lcCommand=lcFormOb+'.qmess.value='+lcMessage &lcCommand Else liforms=_vfp.Forms.Count For li = liforms To 1 Step -1 If Type('_vfp.forms.item(li).qmess')='O' _vfp.Forms.Item(li).qmess.Value=lcMessage _vfp.Forms.Item(li).qmess.Refresh llsuccess=.T. Exit Endif Next If !llsuccess Wait Window lcMessage Nowait Endif Endif DoEvents && put this in to ensure a message displays even when an Activex Control is on the form Return .T.