08 2022 档案
摘要:AppDomain.CurrentDomain.BaseDirectory 返回结果为::D:\mycode\,而Application.StartupPath 返回结果为:D:\mycode Application.StartupPath 只能用于WinForm窗体中,而AppDomain.Cur
阅读全文
摘要:在VS中,通过Nuget为目标EXE工程安装Costura.Fody。 重新构建项目。
阅读全文
摘要:解决方案一:(不推荐) 在构造函数处添加代码System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;禁止捕获对错误线程的调用 public Form1() { InitializeComponent(); System
阅读全文
摘要:引用DLL [DllImport("winmm")] static extern uint timeGetTime(); [DllImport("winmm")] static extern void timeBeginPeriod(int t); [DllImport("winmm")] stat
阅读全文