I have a form that can create another form like this.
private void AEGISBot(String option) {
if (AEGIS == null) {
AEGIS = new Form();
AEGIS.ShowInTaskbar = false;
AEGIS.TopMost = true;
AEGIS.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
AEGIS.Size = new Size(396, 191);
//AEGIS.Size = new Size(720, 720);
AEGIS.StartPosition = FormStartPosition.CenterScreen;
AEGIS.BackColor = Color.LightBlue;
AEGIS.TransparencyKey = AEGIS.BackColor;
Label AEGISLabel = new Label();
AEGISLabel.Location = new Point(0, 0);
AEGISLabel.Size = new Size(AEGIS.Size.Width, AEGIS.Size.Height);
AEGISLabel.TextAlign = ContentAlignment.MiddleCenter;
AEGISLabel.Text = "AEGIS";
AEGISLabel.Font = new Font("Agency FB", 120, FontStyle.Bold);
AEGISLabel.ForeColor = System.Drawing.Color.Navy;
AEGIS.Controls.Add(AEGISLabel);
}
if (option == "show"){
AEGIS.Show();
}
}
But how to hide it from alt tab. I tried to add code like this.
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x80;
return cp;
}
}
My main form was successfully hidden from alt tab. But how to use it to created form ??
Thank you
-Edit
I am using Windows Form Application. With some form setting
this.ShowInTaskbar = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.ShowIcon = false;
this.WindowState = FormWindowState.Minimized;