C# - Why won't a fullscreen winform app ALWAYS cover the taskbar?

后端 未结 5 599
名媛妹妹
名媛妹妹 2020-12-31 01:45

I\'m using Windows Vista and C#.net 3.5, but I had my friend run the program on XP and has the same problem.

So I have a C# program that I have running in the backgr

5条回答
  •  没有蜡笔的小新
    2020-12-31 02:07

    private void Form1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.F11)
            if (FormBorderStyle == FormBorderStyle.None)
            {
                FormBorderStyle = FormBorderStyle.Sizable;
                WindowState = FormWindowState.Normal;
            }
            else
            {
                SuspendLayout();
                FormBorderStyle = FormBorderStyle.None;
                WindowState = FormWindowState.Maximized;
                ResumeLayout();
            }
    }
    

提交回复
热议问题