最近做了一个界面,采用C#编程语言,界面中有很多控件,本来是想当窗体最大化后,其他空间跟随一起等比例放大,通过代码已经实现了这个功能,但是在最大化过程中出现闪烁情况,请问如何解决?
网上的方法采用双缓冲也不行。
上位机编程不太熟练,一边找资料 一边做。
public Form1()
{
InitializeComponent();
}
//2. 为窗体添加Load事件,并在其方法Form1_Load中,调用类的初始化方法,记录窗体和其控件的初始位置和大小
private void Form1_Load(object sender, EventArgs e)
{
asc.controllInitializeSize(this);
}
//3.为窗体添加SizeChanged事件,并在其方法Form1_SizeChanged中,调用类的自适应方法,完成自适应
private void Form1_SizeChanged(object sender, EventArgs e)
{
asc.controlAutoSize(this);
}
///////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;