C#初学总结
来源:互联网 发布:微信误删恢复软件 编辑:程序博客网 时间:2024/06/01 12:57
DateTime t1 = Convert.ToDateTime("1999-8-9");DateTime t2 = Convert.ToDateTime("2007-8-19");TimeSpan ts = t2 - t1;int d = ts.Days;d就是间隔的天数--------------------------------------------------------------------------------------Point formPoint = this.Location;//获取窗体的屏幕坐标Point mousePoint = Control.MousePosition;//获取鼠标光标的坐标e.Button == MouseButtons.Left;//判断点击的是左键--------------------------------------------------------------------------------------//1、在屏幕的右下角显示窗体//这个区域不包括任务栏的Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this);//这个区域包括任务栏,就是屏幕显示的物理范围Rectangle ScreenArea = System.Windows.Forms.Screen.GetBounds(this);int width1 = ScreenArea.Width; //屏幕宽度 int height1 = ScreenArea.Height; //屏幕高度this.Location = new System.Drawing.Point(width1 - 窗体宽度, height1 - 窗体高度); //指定窗体显示在右下角//2、在母窗体的中间显示子窗体的位置计算waitForm.Location = new Point((this.Location.X + (this.Width - waitForm.Width) / 2), (this.Location.Y + (this.Height - waitForm.Height) / 2));---------------------------------------------------------------------------------------------设置:FormBorderStyle:FixedDialog可以隐藏窗口图标并固定窗口大小!给空间删除事件,比如:onMouseDown的事情,只需(控件.MouseDown -= 函数;)增加事件同理 GenerateMember:false;会产生错误!
- C#初学总结
- 初学C#总结25个问题
- C#初学
- 初学C#
- 初学C#
- 初学C#
- 初学 C#
- C# 初学
- C# 初学
- 初学C#
- 初学C#
- 初学C#
- 初学C#
- C#初学
- c#初学
- 初学c#
- 初学C#
- c#初学
- 沙尘暴来袭
- The kth great number
- 阿里巴巴电话面试
- 天天都在
- The Frog's Games
- C#初学总结
- android之Fragment(官网资料翻译)
- 《新人怎么学嵌入式》
- 当泛型遇见重载
- 找素数 素数就是不能再进行等分的整数。比如:7,11。而9不是素数,因为它可以平分为3等份。
- 微信公众平台为什么会火
- 黑马程序员————学习日记【18】 【基础加强2】
- 用JS写的计时器setTimeout与setInterval
- 07 OGNL