>> private void frmMain_Deactivate(object sender, EventArgs e)
> this event is fired automatically .at that time form object has been
[quoted text clipped - 24 lines]
>> I have to create a reference object or whats the story thanks.
>> Al.
Yes, thank you that is what I suspected, but there is no information on
doing this job properly in all the threads I have looked at. For the
sake of completeness, would someone kindly put up the 'approved' method
for showing and hiding forms in the above circumstances.
Even if the resize event is used, when its time to restore there is the
form object needed.
Thank you. Alistair.
Marko Draca - 24 Sep 2007 09:50 GMT
>>> private void frmMain_Deactivate(object sender, EventArgs e)
>> this event is fired automatically .at that time form object has been
[quoted text clipped - 32 lines]
> form object needed.
> Thank you. Alistair.
Are you looking for something like this:
private void frmMain_Resize(object sender, EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
{
this.Hide();
}
}
private void niTray_DoubleClick(object sender, EventArgs e)
{
this.Show();
WindowState = FormWindowState.Normal;
}
Alistair George - 24 Sep 2007 19:46 GMT
> Are you looking for something like this:
>
[quoted text clipped - 11 lines]
> WindowState = FormWindowState.Normal;
> }
Crikey, I never used ".this" because I figured it had been lost in
windows deactivate, but it works and perfectly thank you.