I have the below code which I use which includes hiding the taskbar by my form. It works well if there are two screens connected to my computer but if there is only one screen the taskbar shows, I am not sure why?
FormBorderStyle = FormBorderStyle.None;
await Task.Delay(500);
this.WindowState = FormWindowState.Normal;
this.ActiveControl = textBox1;
StartPosition = FormStartPosition.Manual;
Location = new Point(0, 0);
var height = Screen.AllScreens.Max(x => x.WorkingArea.Height + x.WorkingArea.Y);
var width = Screen.AllScreens.Max(x => x.WorkingArea.Width + x.WorkingArea.X);
Size = new Size(width, height);
this.BringToFront();
this.AcceptButton = button1;
this.ControlBox = false;
this.TopMost = true;
this.Size = Size;
Rectangle ru = Rectangle.Union(Screen.AllScreens[0].Bounds , Screen.AllScreens[1].Bounds);
Bounds = ru;