c#winform窗口启动位置设置--中心位置
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;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
this.StartPosition = FormStartPosition.CenterScreen; //添加在构造函数里面
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
欢迎讨论,相互学习。
cdtxw@foxmail.com