- 博客(136)
- 收藏
- 关注
原创 GetLongPathName和GetShortPathName
GetLongPathName和GetShortPathNamehttps://baike.so.com/doc/539063-570712.html [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern int GetShortPathName( [MarshalAs(UnmanagedType.LPTStr)]string path, .
2020-12-05 12:31:37
21
原创 C# Com组件注册Regsvr32
Regsvr32命令用于注册COM组件,是Windows系统提供的用来向系统注册控件或者卸载控件的命令,以命令行方式运行。命令格式:regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname 其中dllname为activex控件文件名,建议在安装前拷贝到system文件夹下。参数:/u 反注册控件/s 指定 regsvr32 安静运行,在成功注册/反注册DLL文件的前提下不显示结果提示框。/n 指定不调用 DllRegisterServer。此选...
2020-12-05 11:28:59
54
原创 C# DllImport和调用约定
https://www.cnblogs.com/yourpaul/p/6064681.htmlhttps://blog.csdn.net/Breeze_CAT/article/details/89470295
2020-12-03 10:01:12
18
原创 C# 绘图
private void ImagePic(){ Bitmap bmp = new Bitmap(200, 25); Graphics g = Graphics.FromImage(bmp); g.DrawString("上传", Font, new SolidBrush(Color.Red), new PointF(5, 5)); this.BackgroundImage = bmp; g.Dispose();}/// <summary>.
2020-11-15 16:06:41
11
原创 RSA加密
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;namespace Common{ class RSAHelper { [DllImport("openssl.dll", CharSet = CharSet.Ansi)] public static e...
2020-10-25 11:03:30
7
原创 CRC32校验
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using ICSharpCode.SharpZipLib.Checksums;namespace Common{ /// <summary> /// CRC即循环冗余校验码(Cyclic Redundancy Check):是数据通信领域中最常用的一种查错校验码, .
2020-10-25 10:56:36
88
原创 C# XML操作
https://docs.microsoft.com/zh-cn/dotnet/api/system.xml.xmldocument?view=netcore-3.1
2020-10-14 18:29:34
11
原创 C# MD5加密
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Security.Cryptography;using System.IO;namespace Common{ class MD5Helper { /// <summary> /// 获取字符串MD5值 /// </sum.
2020-10-14 15:36:54
41
原创 C#中string.format用法详解
https://www.cnblogs.com/babietongtianta/p/4958189.html
2020-10-14 09:37:07
23
原创 C#使用WM_COPYDATA传输消息
using System.Runtime.InteropServices; public partial class Form1 : Form { public Form1() { InitializeComponent(); } [DllImport("user32.dll", EntryPoint = "FindWindow")] private extern static.
2020-09-17 15:31:25
119
原创 C# WinForm开发系列 - DataGridView
https://www.cnblogs.com/peterzb/archive/2009/05/29/1491891.htmlWinform DataGridView列的单元格中动态添加图片和文字
2020-08-12 18:10:40
26
原创 HTTP和HTTPS协议,看一篇就够了
https://blog.csdn.net/xiaoming100001/article/details/81109617
2020-08-03 09:56:34
95
原创 DataGridView设置列标题不换行
https://blog.csdn.net/alisa525/article/details/7556771
2020-07-21 10:16:14
47
原创 C#中DataGridView动态添加行及添加列的方法
https://www.cnblogs.com/LuoEast/p/8213562.html
2020-07-18 10:28:19
363
原创 DataGridView行和列颜色设置
https://blog.csdn.net/wk125570/article/details/78026923https://blog.csdn.net/wangzhen209/article/details/51744518
2020-06-19 19:19:38
451
原创 清除控件订阅的事件
https://www.cnblogs.com/ilookbo/p/4184042.htmlhttps://blog.csdn.net/qq_28018731/article/details/77503256https://blog.csdn.net/feiduan1211/article/details/90106602
2020-06-19 14:21:37
49
原创 字符编码
C# :Encoding,string编码完成后就是一个二进制数组,由有序逻辑继续处理或者传输。常用编码: string转换为byte[] byte[] by = Encoding.Default.GetBytes("我们"); //获取操作系统的当前 ANSI 代码页的编码 //byte[]转成string string str = Encoding.Default.GetString(by); //string转换为ANSI byte[]
2020-05-31 16:14:15
45
原创 Invoke理解
Invoke或者begininvoke,委托。用于在子线程中,执行主线程UI操作时。他的使用必然伴随着Task或者Thread。private void button4_Click(object sender, EventArgs e){ Task t = new Task(()=>{ Thread.Sleep(30000); }); t.Start(); t.ContinueWith(t1 => { this.Invo
2020-05-14 09:45:33
214
原创 C# 条件编译符号
#define #undef #if #elif #else #endif #error #warning #line #region #endregion #pragma warning disable #pragma warning restorehttps://blog.csdn.net/sibaison/article/details/71566772...
2020-03-23 20:52:27
443
原创 简易的日志工具(Trace)
C# 调用"Trace"功能(调试时实用)基于C#中的Trace实现一个简单的日志系统https://docs.microsoft.com/zh-cn/dotnet/api/system.diagnostics.trace?redirectedfrom=MSDN&view=netframework-4.8...
2020-03-23 20:48:59
84
原创 C# 获取当前的 dll 所在的路径
https://blog.csdn.net/anyicheng2015/article/details/78859670
2019-12-06 15:52:33
710
原创 C# json 序列化
invlist = Newtonsoft.Json.JsonConvert.DeserializeObject<FPCYInvList>(data);JObject obj = JObject.Parse(jsonstr);return Convert.ToInt32(obj["msg"].ToString());C#解析JSON字符串总结C# 关于JArray和JO...
2019-10-10 15:26:47
74
原创 delphi调用c# dll
https://www.cnblogs.com/huangmianwu/p/6145044.htmlhttps://www.cnblogs.com/shenyixin/p/4729735.htmlhttps://www.cnblogs.com/bayzhang/p/5162757.html批处理文件编写
2019-09-30 11:23:21
110
原创 C# 事件(Event)
C# 事件(Event) this.lblA3Helper5.Click += new System.EventHandler(this.picClose_Click); this.lblA3Helper5.MouseEnter += new System.EventHandler(this.picClose_MouseEnter); ...
2019-05-28 10:25:05
89
原创 基于C#的http协议开发
基于C#的http协议开发https://www.cnblogs.com/SavionZhang/p/11422481.htmlHttpWebRequest、HttpWebResponse头信息获取string url = "https://hao.360.com/?wd=1000";HttpWebRequest req = (HttpWebRequest)WebRequest.C...
2019-05-27 18:35:22
779
转载 Invoke
//例一delegate void AppendStringCallback(string text); private void AppendString(string txt) { this.listView1.Items.Add(txt); } private void ReceiveDate() { AppendStringCallback ap...
2019-05-23 19:49:45
82
转载 WaitForMultipleObjects
360百科 WaitForMultipleObjects 认识等待函数 WaitForSingleObjectWaitForMultipleObjects用法详解,一看就懂认识等待函数 WaitForSingleObject
2019-05-09 19:55:35
669
原创 获取特殊文件夹
uses Windows, Registry;function GetShellFolder(): string;begin with TRegistry.Create do try RootKey:= HKEY_CURRENT_USER; if OpenKey('Software\MicroSoft\Windows\CurrentVersio...
2019-05-09 15:00:31
73
转载 NPOI Word
规范示例:https://www.cnblogs.com/wsn1203/p/5409203.html干货代码:https://blog.csdn.net/xinxinsky/article/details/60868424杂乱代码:https://blog.csdn.net/bcbobo21cn/article/details/69384859...
2019-04-11 15:27:58
824
原创 判断Windows系统版本
class GetOSystem { //https://www.cnblogs.com/huangenai/p/5976278.html private const string Windows2000 = "5.0"; private const string WindowsXP = "5.1"; private co...
2019-04-10 15:01:41
193
空空如也
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人 TA的粉丝