public frmMain()
{
InitializeComponent();

//解决窗体第一次设置为最大化后,点击最大化按钮窗体无法居中问题
int x = Convert.ToInt32((Screen.PrimaryScreen.WorkingArea.Width - this.Width) * 0.5);
int y = Convert.ToInt32((Screen.PrimaryScreen.WorkingArea.Height - this.Height) * 0.5);
this.SetBounds(x, y, this.Width, this.Height, BoundsSpecified.All);
}

最新文章

  1. Linux 下从头再走 GTK+-3.0 (三)
  2. pypi 国内镜像 及修改全局方法
  3. 机器学习:logistic回归
  4. 删除docker私有库镜像
  5. Month Calendar
  6. LinearLayout按下(pressed)或获取焦点(focused)时背景设置不同颜色或图片
  7. call()与apply()区别
  8. java的动态代理设计模式
  9. mysql中取系统当前时间
  10. 关于AutoCAD.NET的辅助方法
  11. achieve aop through xml
  12. C#拾遗(二、函数)
  13. Spring学习(15)--- 基于Java类的配置Bean 之 @Bean & @Scope 注解
  14. SpriteKit:检测当新场景显示以后
  15. Java网络编程详解
  16. EUI组件之DataGroup
  17. ceph 存储池PG查看和PG存放OSD位置
  18. Linux 150命令之查看文件及内容处理命令 cat tac less head tail cut
  19. lr_get_transaction_duration 函数介绍
  20. ethereum

热门文章

  1. [转]iOS学习之UINavigationController详解与使用(一)添加UIBarButtonItem
  2. C++内存分析
  3. 多校3-Magician 分类: 比赛 2015-07-31 08:13 4人阅读 评论(0) 收藏
  4. combox绑定后添加自定义列
  5. python 中time.sleep没有作用
  6. SPRING官方网下载地址
  7. Java总结反射
  8. noip2011提高组day1+day2解题报告
  9. MUI 授权
  10. 动态创建Layout