[Gambas-user] Me.Close in a multi-form application

Bruce Bruen bbruen at ...2308...
Wed Aug 11 10:38:37 CEST 2010


Hi Vikram,

There are probably much better ways to do what you are trying to do, but its 
hard to suggest them fro the sample.

But for a quick answer:
PUBLIC SUB Form_Close()
  DIM retval AS Integer
  
  IF NOT ME.Visible THEN 
    ME.Close
    RETURN 
  ENDIF 
  
  retval = Message.Question("Are you sure you want to exit FormA?", "Yes", 
"No")
  
  IF retval = 1
    ME.Close
  ELSE 
    STOP EVENT 
  END IF
  
END


-- 
best regards
Bruce Bruen




More information about the User mailing list