Winform开发时 有时会碰到窗体 碰到不同分辨率而导致 有些控件被盖住的情况 所以还是 让窗体根据电脑分辨率显示大小吧!
第一步:添加类 类中添加实现功能的代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PowerSystemByWinForm
{
public class AutoSizeFormClass
{
public struct controlRect
{
public int Left;
public int Top;
public int Width;
public int Height;
}
private bool _Flag;
public bool Flag
{
get { return _Flag; }
set { _Flag = value; }
}
private int _Number;
public int Number
{
get { return _Number; }
set { _Number = value; }