摘要: byte[] a = new byte[] { 0x0A, 0x0C, 0x2f, 0x8a }; byte[] bya = new byte[4]; Buffer.BlockCopy(a, 0, bya, 0, 3); bya[3] = 0x00; string hex = Convert.ToS 阅读全文
posted @ 2020-01-09 13:15 虎虎虎 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) 2 { 3 if (e.ColumnIndex >= 0 && e.RowIndex >= 0 && dataGridView1[e. 阅读全文
posted @ 2019-12-26 14:06 虎虎虎 阅读(294) 评论(0) 推荐(0) 编辑
摘要: django2.0 把原来的 django.core.urlresolvers 包 更改为了 django.urls包。所以将导入的包修改为django.urls。 阅读全文
posted @ 2019-04-25 21:31 虎虎虎 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: 当一个页面中添加了许多同类型控件,当需要控制这些控件进行显示或隐藏的时候,需要一个个的将Visible属性设置为false,十分不方便, 后通过论坛受一位大神(至于叫什么忘了)的启发,通过建立控件数组的方式可以实现同种控件批量修改同一属性。 ToolStripStatusLabel[] Tlable 阅读全文
posted @ 2019-04-25 14:20 虎虎虎 阅读(887) 评论(0) 推荐(0) 编辑
摘要: 1、Python3.7+Django2.2操作Mysql数据库时出现如下错误:django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11.None是因为MyS 阅读全文
posted @ 2019-04-09 10:50 虎虎虎 阅读(570) 评论(0) 推荐(0) 编辑
摘要: 我特喵的,见鬼了。 几个相同的Tabpage中添加相同toolStrip控件,每次都是第二个Tabpage中的消失,但是查看设计器下面又显示控件存在,点击也会出现,运行后就没有了,真的是奇怪。 最后经多方搜索汇总,读出结论是他喵的Vs2010的问题只需去*designer.cs 中去把 this.t 阅读全文
posted @ 2019-03-22 17:15 虎虎虎 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: 1、获取总列数 int Column_num = DataGridView1.ColumnCount; 2、获取总行数 int Column_num = DataGridView1.RowCount; 3、获取选中行索引 int selectRows_num = DataGridView1.Curr 阅读全文
posted @ 2019-03-22 14:28 虎虎虎 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 废话不多说直接上代码。 生成验证码图片,需要先生成验证码,再将验证码处理为图片。 转载引用黎木博客-https://www.cnblogs.com/running-mydream/p/4071528.html 阅读全文
posted @ 2018-09-29 10:39 虎虎虎 阅读(721) 评论(2) 推荐(0) 编辑
摘要: 随机生成验证码,不能以图片的形式存在,所以需要将验证码图片以MemoryStream形式存储在内存的流当中,但是在使用时发现使用PictureBox控件无法显示内存流,所以需要先将流转化为图片,才可以显示,需要使用Bitmap类(System.Drawing.Bitmap)将内存流转化为图片的形式B 阅读全文
posted @ 2018-09-29 09:14 虎虎虎 阅读(471) 评论(0) 推荐(0) 编辑
摘要: DataGridView添加的数据最后一步无法生效的问题。 阅读全文
posted @ 2018-08-16 10:05 虎虎虎 阅读(346) 评论(0) 推荐(0) 编辑