C#中的什么Form属性可以让窗体运行时不能用鼠标拖拽改变大小?
展开全部
原理就是让他的最大值和最小值相等,这样就可以了
这是代码:
MaximumSize = new Size(569,456);
MinimumSize = new Size(569, 456);
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 固定窗体
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
MaximumSize = new Size(569,456);
MinimumSize = new Size(569, 456);
}
}
}
这是代码:
MaximumSize = new Size(569,456);
MinimumSize = new Size(569, 456);
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 固定窗体
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
MaximumSize = new Size(569,456);
MinimumSize = new Size(569, 456);
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询