winform form窗体边框颜色怎么设置?
答案:2 悬赏:30 手机版
解决时间 2021-02-20 05:24
- 提问者网友:人生佛魔见
- 2021-02-19 11:22
winform form窗体边框颜色怎么设置?
最佳答案
- 五星知识达人网友:低血压的长颈鹿
- 2021-02-19 12:10
C#
有两种办法
1.代码中加 form1.FormBorderStyle = FormBorderStyle.None;//无边框
2.在窗本属性栏找FormBorderStyle选择none
private void Form1_Load(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.None;//无边框
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(Pens.DarkOliveGreen, 0, 0, this.Width - 1, this.Height - 1);
}
有两种办法
1.代码中加 form1.FormBorderStyle = FormBorderStyle.None;//无边框
2.在窗本属性栏找FormBorderStyle选择none
private void Form1_Load(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.None;//无边框
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(Pens.DarkOliveGreen, 0, 0, this.Width - 1, this.Height - 1);
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯