上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 使用NSIS制作可执行程序的安装包: 1,NSIS下载地址:https://pan.baidu.com/s/1GzzQNXgAlJPJWgjBzVwceA 下载完成之后解压缩,打开安装程序,默认安装即可。 2,打开NSIS,点击“可视化脚本编辑器(VNISEdit)”。 3,选择“使用脚本向导创建新 阅读全文
posted @ 2020-02-26 16:05 小大大小 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: C#设置一个控件可以鼠标拖动: 新建一个C#项目, 创建一个label控件, 设置label的鼠标按下和抬起事件分别为:label1_MouseDown和label1_MouseUp。 对代码进行如下修改。 public partial class Form1 : Form { private Po 阅读全文
posted @ 2020-02-26 15:18 小大大小 阅读(935) 评论(0) 推荐(0) 编辑
摘要: C#画图超出屏幕的部分无法显示,通过AutoScrollMinSize属性及相关方法解决问题。 可以实现 到 的转变。 代码如下: using System.Drawing; using System.Windows.Forms; namespace drawing_test { public pa 阅读全文
posted @ 2020-02-10 13:52 小大大小 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: C#获取当前不同网卡对应的iP: public string GetLocalIP() { IPAddress localIp = null; try { IPAddress[] ipArray; ipArray = Dns.GetHostAddresses(Dns.GetHostName()); 阅读全文
posted @ 2020-02-06 13:44 小大大小 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: C#对config.ini文件进行读取和修改: public partial class Patrolcar : Form之后可以加入如下类: #region public class IniFile { public string map_length, map_width, maxnum_con 阅读全文
posted @ 2020-02-06 13:37 小大大小 阅读(2363) 评论(0) 推荐(0) 编辑
摘要: C#String类型转换成Brush类型: using System.Windows.Media; BrushConverter brushConverter = new BrushConverter(); Brush brush = (Brush)brushConverter.ConvertFro 阅读全文
posted @ 2020-02-06 13:29 小大大小 阅读(968) 评论(0) 推荐(0) 编辑
摘要: 创建共享内存python文件: import mmap import contextlib import time with contextlib.closing(mmap.mmap(-1, 100, tagname='SASU', access=mmap.ACCESS_WRITE)) as m: 阅读全文
posted @ 2020-02-06 13:16 小大大小 阅读(6814) 评论(0) 推荐(1) 编辑
摘要: C#中画三角形和填充三角形的简单实现: private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; //绘制三角形 DrawTriangle_1(g); //填充三角形 FillTriang 阅读全文
posted @ 2020-01-17 10:30 小大大小 阅读(3807) 评论(0) 推荐(0) 编辑
摘要: C#中向ListView控件中添加一行数据: 1,先声明一个ListViewItem: ListViewItem item = new ListViewItem(); 2,添加第一列数据: item.Text = "第1列数据"; 3,依次添加后面列的数据: item.SubItems.Add(" 阅读全文
posted @ 2020-01-17 10:24 小大大小 阅读(8735) 评论(0) 推荐(1) 编辑
摘要: C#中字节数组byte[]和字符串string类型的相互转换: string转byte[]: byte[] byteArray = System.Text.Encoding.Default.GetBytes ( str ); byte[]转string: string str = System.Te 阅读全文
posted @ 2020-01-17 10:20 小大大小 阅读(2487) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页