'--- In rapidq@yahoogroups.com, "Fabrizio" <kiwifab@l...> wrote:
'> Suppose you have a SUB for the form.onclose event that ask you if you 
'> really want exit or not from the application. What would be the  code 
'> (a KILLMESSAGE I suppose...??) for abort the event if the user 
'> says "no"?

'try this

$include "rapidq.inc"
declare sub formpaint
declare sub formclose (action as integer)
CREATE Win1 AS QFORM
onpaint = formpaint
onclose = formclose
END CREATE
Win1.SHOWMODAL
sub formpaint
Win1.TEXTOUT (1,1,"Hello World",1,-1)
end sub

sub formclose
if Messagedlg("EXIT program?",0,mbYes OR mbNO,0) = 7 THEN
action = 0
end if
end sub
