静观其变

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

08 2005 档案

摘要:string str1 =Process.GetCurrentProcess().MainModule.FileName; //可获得当前执行的exe的文件名。 string str2=Environment.CurrentDirectory; //获取和设置当前目录(即该进程从中启动的目录)的完全限定路径。 //备注 按照定义,如果该进程在本地或网络驱动器的根目录中启动, //则此属性的值为驱动... 阅读全文
posted @ 2005-08-31 13:41 wangyue 阅读(1365) 评论(0) 推荐(0)

摘要:一、创建和释放TRegistry对象  1.创建TRegistry对象。为了操作注册表,要创建一个TRegistry对象:ARegistry := TRegistry.Create;  2.释放TRegistry对象。对注册表操作结束后,应释放TRegistry对象所占内存:ARegistry.Destroy。二、指定要操作的键  操作注册表时,首先应指定操作的主键:先给属性RootKey赋值以指... 阅读全文
posted @ 2005-08-10 13:57 wangyue 阅读(2209) 评论(1) 推荐(0)

摘要:usingSystem;usingSystem.Runtime.InteropServices;namespaceConsoleApplication{publicsealedclassEntryPoint{privateEntryPoint(){}[DllImport("Gdi32.dll",CharSet=CharSet.Auto,ExactSpelling=true)]publicstati... 阅读全文
posted @ 2005-08-08 09:48 wangyue 阅读(1372) 评论(0) 推荐(0)

摘要:下面的代码实现修改显示器分辨率和刷新频率的功能:usingSystem;usingSystem.Drawing;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;usingSystem.Runtime.InteropServices;namespaceScree... 阅读全文
posted @ 2005-08-07 23:09 wangyue 阅读(2460) 评论(0) 推荐(0)

摘要:全屏分辩率:Screen.PrimaryScreen.Bounds.Size工作区域分辩率:Screen.PrimaryScreen.WorkingArea.Size 阅读全文
posted @ 2005-08-07 00:14 wangyue 阅读(978) 评论(0) 推荐(0)