2011年4月28日

C# 获得当前目录和执行目录的一些方法

摘要: From:http://www.cnblogs.com/changhai0605/archive/2008/07/09/1239057.html1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName 获取模块的完整路径。 2. System.Environment.CurrentDirectory 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。 3. System.IO.Directory.GetCurrentDirectory() 获取应用程序的当前工作目录。这个不一定是程序从中启动的目录啊,有可 阅读全文

posted @ 2011-04-28 15:01 ATAK 阅读(193) 评论(0) 推荐(0) 编辑

C#打开记事本并填写内容

摘要: C#打开记事本并填写内容代码如下: using System.Runtime.InteropServices; using System.Diagnostics; [DllImport("User32.DLL")] public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, string lParam); [DllImport("User32.DLL")] public static extern IntPtr FindWindowEx(IntPtr hwndParent 阅读全文

posted @ 2011-04-28 15:00 ATAK 阅读(867) 评论(0) 推荐(0) 编辑

导航