On 2004-04-06, HANG LAM <(E-Mail Removed)> wrote:
> hi,
>
> How do I capture the closing events coming from the 'X' icon in the
> top-right corner of a form and the
> Form.Close() command?
> I want to be able to differentiate between the Closing Event coming from the
> 'X' icon in the top-right corner of a form and the closing event coming from
> the Form.Close() command.
>
> I don't want the user to be able to close the application by clicking on the
> "X" icon on the top-right corner in a form so I override the Closing event
> but I want the form to close when Form.Close() is called.
>
> In Wisual Basic 6.0, I used to do it by checking the Unload Mode against
> vbFormControMenu variable.
>
>
> Thanks,
> Scott
>
>
Here's an article that discusses one way to accomplish this...
http://www.fawcette.com/archives/pre...111/qa0111.asp
HTH
--
Tom Shelton [MVP]
Powered By Gentoo Linux 1.4
Even bytes get lonely for a little bit.