摘要: var path = HttpContext.Server.MapPath($"~/Temp/文件xls导出{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xls"); 获取datatable数据... try { Workbook newBook1 = n 阅读全文
posted @ 2020-11-28 14:54 棂信 阅读(243) 评论(0) 推荐(0) 编辑
摘要: using System.ServiceProcess; string serviceName = "WeChat"; string processName = "WeChat"; private void Test1() { List<string> ls = new List<string>() 阅读全文
posted @ 2020-11-28 14:44 棂信 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 发送端: using System.Runtime.InteropServices; //DllImport /*发送消息的结构体*/ [DllImport("User32.dll", EntryPoint = "SendMessage")] private static extern int Se 阅读全文
posted @ 2020-11-28 14:41 棂信 阅读(308) 评论(0) 推荐(0) 编辑
摘要: using System.Windows.Interop;using System.Runtime.InteropServices; //DllImport /*通过这个方法,可以找到主进程的窗体*/ [DllImport("User32.dll", EntryPoint = "FindWindow 阅读全文
posted @ 2020-11-28 14:32 棂信 阅读(447) 评论(0) 推荐(0) 编辑
摘要: using System.Windows.Interop; this.SourceInitialized += new EventHandler(MainWindow_SourceInitialized); protected override void OnSourceInitialized(Ev 阅读全文
posted @ 2020-11-28 14:26 棂信 阅读(524) 评论(0) 推荐(0) 编辑