private void Form1_Load(object sender, EventArgs e)
{
this.Left = 0;
this.Top = 0;
int wx=Screen.PrimaryScreen.WorkingArea.Width;//获得桌面的大小
int wy=Screen.PrimaryScreen.WorkingArea.Height;
//获得当前程序的相对路径
mypath = Application.StartupPath;
this.Width = wx;
this.Height = wy;
}
本文介绍了一段使用C#实现窗体全屏显示的代码。通过获取屏幕尺寸并调整窗体位置和大小,使得应用程序能够完全铺满整个屏幕。此外,还展示了如何获取程序的启动路径。
4553

被折叠的 条评论
为什么被折叠?



