>Hi everybody:
>
>Here we go again! I'm trying to avoid the user to exit the form using the X in the corner of the form. Please dont suggest to remove the control because is not allow in the design. I use the "Handles Me.FormClosing" but I need to stop closing if the user have changes that did not save. Any Ideas will be apreciated.
>
>TK
>
>PD
>
>Happy New Year 2008!!! Late but sure.
in c# you do it like this:
private void MainForm_Closing(object sender, CancelEventArgs e)
{
bool shouldICloseMyForm = !DataSet.HasChanges();
e.cancel = shouldIcloseMyForm;
}