Simon,
Set some form variable to true if your code closes the form from a menu
option, button click, etc. Then in your closing event handler you can
inspect that variable to see if you caused the closing to happen or not.
--
Ginny Caughey
Device Application Development MVP
[quoted text, click to view] "Simon" <simondj@cheapnet.it> wrote in message
news:O3uepnWGIHA.3548@TK2MSFTNGP06.phx.gbl...
>
>> Handle the Form.Closing event
>
> If i handle this event i cannot know if the closing of the window is
> generated by the OS or by my application.
>
> Thanks.
>
> Simon.