A
Alistair George
Hi in Delphi its a piece of cake to show and hide a mainform eg
mainform.show mainform.hide.
However, after finding similar actions in C# seem to result in destroy
of form object, which causes errors maybe I am wrong, but here is what I
have tried with no joy:
private void TrayFormShow_Click(object sender, EventArgs e)
{
frmMain.ActiveForm.ShowInTaskbar = true;
frmMain.ActiveForm.WindowState = FormWindowState.Maximized;
// or: frmMain.ActiveForm.Visible = true;
}
private void frmMain_Deactivate(object sender, EventArgs e)
{
frmMain.ActiveForm.ShowInTaskbar = false;
frmMain.ActiveForm.WindowState = FormWindowState.Minimized;
// or: frmMain.ActiveForm.Visible = false;
}
Once the frmMain is hidden, then it causes an error when try to show. Do
I have to create a reference object or whats the story thanks.
Al.
mainform.show mainform.hide.
However, after finding similar actions in C# seem to result in destroy
of form object, which causes errors maybe I am wrong, but here is what I
have tried with no joy:
private void TrayFormShow_Click(object sender, EventArgs e)
{
frmMain.ActiveForm.ShowInTaskbar = true;
frmMain.ActiveForm.WindowState = FormWindowState.Maximized;
// or: frmMain.ActiveForm.Visible = true;
}
private void frmMain_Deactivate(object sender, EventArgs e)
{
frmMain.ActiveForm.ShowInTaskbar = false;
frmMain.ActiveForm.WindowState = FormWindowState.Minimized;
// or: frmMain.ActiveForm.Visible = false;
}
Once the frmMain is hidden, then it causes an error when try to show. Do
I have to create a reference object or whats the story thanks.
Al.