会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
月下独酌孤醉
一个不知道自己在干嘛的程序猿!!!
博客园
首页
新随笔
联系
订阅
管理
2022年1月17日
winfrom窗体在关闭 最大化 最小化 最小化点开后触发事件
摘要: 在Form的CS文件里面加入下面方法,四个参数对应四个值。在不同的方法内写触发方法。 const int WM_SYSCOMMAND = 0x112; const int SC_CLOSE = 0xF060; const int SC_MINIMIZE = 0xF020; const int SC_
阅读全文
posted @ 2022-01-17 09:36 月下独酌孤醉
阅读(194)
评论(0)
推荐(0)
编辑
2021年3月1日
DataGridView 指定位置添加按钮
摘要: 注:此方法添加的按钮固定位置,不能移动,如果想跟着dgv滚动条拉动移动,最好是重写 System.Windows.Forms.Button btn = new System.Windows.Forms.Button();//创建Buttonbtn btn.Text = "<";//设置button文
阅读全文
posted @ 2021-03-01 09:43 月下独酌孤醉
阅读(283)
评论(0)
推荐(1)
编辑
2021年2月23日
强行结束Thread
摘要: System.Threading.Thread thread; public void Dispose() { if (thread.ThreadState == ThreadState.Running) { thread.Abort(); } }
阅读全文
posted @ 2021-02-23 14:36 月下独酌孤醉
阅读(60)
评论(0)
推荐(0)
编辑
调试小技巧
摘要: //在指定路径生成文档,内容是你运行步骤的时间+输入的msg public static void WriteMessage(string msg) { File.AppendAllText(Path, DateTime.Now.ToLongTimeString() + ":\t" + msg +
阅读全文
posted @ 2021-02-23 14:33 月下独酌孤醉
阅读(33)
评论(0)
推荐(0)
编辑
判断直线和圆的交点
摘要: /// <summary> /// 判断直线和圆的交点 /// </summary> public bool GetIntersectionCircle(double startx, double starty, double endx, double endy, double centerx, d
阅读全文
posted @ 2021-02-23 14:27 月下独酌孤醉
阅读(265)
评论(0)
推荐(0)
编辑
求直线和直线交点
摘要: /// <summary> /// 求直线和直线交点 /// </summary> public double[] GetIntersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4,
阅读全文
posted @ 2021-02-23 14:25 月下独酌孤醉
阅读(93)
评论(0)
推荐(0)
编辑
判断交点是否在圆弧上
摘要: 通过判断与圆的交点找到交点后,可通过这一步来判断交点是否在圆弧上面 //这个是判断顺时针还是逆时针旋转 if (templine.EndAngle - templine.StartAngle >= 0) direction = true; else direction = false; public
阅读全文
posted @ 2021-02-23 14:24 月下独酌孤醉
阅读(522)
评论(0)
推荐(0)
编辑
公告