您好,欢迎来到尚佳旅游分享网。
搜索
您的当前位置:首页winform字体及窗体大小设置

winform字体及窗体大小设置

来源:尚佳旅游分享网
winform字体及窗体⼤⼩设置

设置字体⼤⼩:

Font font=new Font(textBox1.Font.FontFamily, float.Parse(textBox1.Text), textBox1.Font.Style);Font font=new Font(\"⿊体\

获取显⽰器屏幕⼤⼩:

int xWidth = SystemInformation.PrimaryMonitorSize.Width;//获取显⽰器屏幕宽度int yHeight = SystemInformation.PrimaryMonitorSize.Height;//⾼度

设置窗体⼤⼩:

this.StartPosition = FormStartPosition.Manual;this.Width =(xWidth/3)*1;this.Height = yHeight;

Globals.ThisAddIn.Application.WindowState = Microsoft.Office.Interop.PowerPoint.PpWindowState.ppWindowNormal;Globals.ThisAddIn.Application.Top = 0;Globals.ThisAddIn.Application.Left= 0;

Globals.ThisAddIn.Application.Width =600;

Globals.ThisAddIn.Application.Height = yHeight;

设置窗体相对桌⾯位置

this.SetDesktopLocation(xWidth - (xWidth / 3) * 1, 0);

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- shangjiatang.cn 版权所有 湘ICP备2022005869号-4

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务