11 2023 档案
摘要:使用VS编译C++时,报错: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格 式以防止数据丢失。 利用VS的高级保存选项,修改合适的编码规则即可解决,最新版VS需要手动添加高级保存选线的命令,方法如下: 打开工具-->自定义 选择
阅读全文
摘要:下载MinGW: 下载地址:MinGW - Minimalist GNU for Windows download | SourceForge.net 安装MinGW: 例如安装在D:\MinGW文件夹下,安装好后选择需要下载的与The GNU C++ Compiler相关的4个安装包 选好安装包后
阅读全文
摘要:dumpbin -dependents "D:\xxxx\xxx\xx.dll" 使用dumpbin命令,列表中包含mscoree.dll就是托管dll。 托管:
阅读全文
摘要:step1:NuGet安装Costura.Fody和Fody step2:安装后,打开根目录下的FodyWeavers.xml文件,将内容替换如下后,再执行编译即可封装dll <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
阅读全文
摘要:第一种方法:抓取程序的进程名,在系统已运行进程中检索该进程名是否已经存在 //获取欲启动进程名 string strProcessName = System.Diagnostics.Process.GetCurrentProcess().ProcessName; //检查进程是否已经启动,已经启动则
阅读全文
摘要:static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += Applicatio
阅读全文
摘要:int iFormWidth, iFormHeight;//初始窗体宽高 //窗体加载事件 private void Form1_Load(object sender, EventArgs e) { iFormWidth = this.Width;//初始宽 iFormHeight = this.H
阅读全文
摘要:protected bool getTimeSpan(string timeStr) { //判断当前时间是否在工作时间段内 string _strWorkingDayAM = "07:00"; string _strWorkingDayPM = "19:00"; TimeSpan dspWorki
阅读全文
摘要:using System.Net.Mail; MailMessage mmsg = new MailMessage(); mmsg.From = new MailAddress("");//发件邮箱地址 mmsg.To.Add("");//收件邮箱地址 mmsg.Subject = "";//邮件标
阅读全文
摘要:using System.Speech.Synthesis; SpeechSynthesizer speech = new SpeechSynthesizer(); speech.Speak("");//同步 speech.SpeakAsync("");//异步
阅读全文