How to detect is the form is open or not ?????