I want control them all from the main window which is already hidden ,,,
Here is the code I am working with in main form ... but it's not working as I want.
PHP Code:
switch (client.LoginInfo.Limited)
{
case true:
this.Hide();
User_Form LF = new User_Form(client);
LF.AdminControlIsVisible = false;
DialogResult dr = LF.ShowDialog(this);
if (dr == System.Windows.Forms.DialogResult.Cancel)
{
//logout
}
else if (dr == System.Windows.Forms.DialogResult.OK)
{
if (client != null)
{
//hide
}
else
{
UpdateSystemMessage("No response from the server !!");
}
return;
}
break;
case false:
User_Form LF = new User_Form(client);
LF.AdminControlIsVisible = false;
DialogResult dr = LF.ShowDialog(this);
this.Visible = false;
if (dr == System.Windows.Forms.DialogResult.Cancel)
{
//logout
}
else if (dr == System.Windows.Forms.DialogResult.OK)
{
if (client != null)
{
//hide
}
else
{
UpdateSystemMessage("No response from the server !!");
}
return;
}
break;
}
Any solution ?






