Re: avoid closing Windows form
From: Michael Voss (michael.voss_at_lvrREMOVE.deCAPS)
Date: 08/30/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Sync between DataGrid and DB"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Ram Hungry?"
- In reply to: VMI: "Re: avoid closing Windows form"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 30 Aug 2004 15:40:40 +0200
VMI wrote:
> I overrode WndProc:
You do not have to do that. Just put something like
> > private void frm_audit_Closing(object sender,
> > System.ComponentModel.CancelEventArgs e)
> > {
> > if (_BisSavingData)
> > {
> > // Code that will override the Closing method. I don't want the
form to close
e.Cancel = true;
return;
> > }
> > else
> > {
> > // Continue closing the form
> > }
> > }
into your "Form closing" eventhandler.
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Sync between DataGrid and DB"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Ram Hungry?"
- In reply to: VMI: "Re: avoid closing Windows form"
- Messages sorted by: [ date ] [ thread ]