0
        const int SWP_SHOWWINDOW = 0x0040;
        int Left = Convert.ToInt32(LeftSizeTextBox.Text);
        int Top = Convert.ToInt32(TopSizeTextBox.Text);
        int Width = Convert.ToInt32(WidthSizeTextBox.Text);
        int Height = Convert.ToInt32(HeightSizeTextBox.Text);
        IntPtr handle = FindWindow(null, WindowTextBox.Text);
        SetWindowPos(handle, -2, Top - 8, Left - 30, Width + 32, Height + 38, SWP_SHOWWINDOW);
        SetForegroundWindow(handle);

I want TRUE fullscreen. Currently mine only puts it mostly fullscreen but it stops slightly below the bottom, and doesn't cover the taskbar. How do I made it completely (Windowed borderless) while still being able to alt tab? If you've ever used shiftwindow, that is my desired effect.

1 Answers1

1

To make a (border less) window go true fullscreen, go to your Form's properties (CTRL + W, P) then set ControlBox to false and WindowState to Maximized. This should display your form over the taskbar. Here is the code of you want to do it dynamically:

//ControlBox
this.ControlBox = false;
//WindowState
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

Edit: This will only make your form go true fullscreen. Looking at your code I think you are trying to make other forms go fullscreen.

Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
matthewr
  • 4,679
  • 5
  • 30
  • 40