摘要: [DllImport("user32.dll")] public static extern bool PrintWindow( IntPtr hwnd, // Window to copy,Handle to the window that will be copied. IntPtr hdcBlt, // HDC to print into,Handle to the device context. UInt32 nFlags /... 阅读全文
posted @ 2013-04-12 22:29 逍遥子k 阅读(1780) 评论(0) 推荐(0) 编辑
摘要: private string[] GetFiles(string path) { List<string> lstFiles = new List<string>(); lstFiles.AddRange(Directory.GetFiles(path)); string[] dirs = Directory.GetDirectories(path); foreach (string dir in dirs) { try ... 阅读全文
posted @ 2013-04-12 22:18 逍遥子k 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 在写入文件时,指定Encoding为ASCIIEncoding.Default就可以解决该问题如 File.WriteAllText("update.bat","taskkill /F /IM explorer.exe", ASCIIEncoding.Default); //创建批处理文件 阅读全文
posted @ 2013-04-12 22:15 逍遥子k 阅读(470) 评论(0) 推荐(0) 编辑