首页 相关文章 用VB5读写注册表实例

用VB5读写注册表实例

首先新建一个工程,在新建的窗体上添加以下控件并设置相应属性:
  控件名属性值
  Label1Caption注册表键值:
  Label2Caption注册姓名:
  Label3Caption空
  Label4Caption注册公司:
  Label5Caption空
  Label6Caption空
  Text1Text空
  Text2Text空
  Command1Caption写入注册表
  Command2Caption退出
  然后,在程序的声明部分添加如下代码:
  PrivateDeclareFunctionRegCreateKeyLib"advapi32.dll"Alias"RegCreateKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLong
  PrivateDeclareFunctionRegQueryValueExLib"advapi32.dll"Alias"RegQueryValueExA"(ByValhKeyAsLong,ByVallpValueNameAsString,ByVallp...[ 查看全文 ]

2016-02-19 标签:

用VB5读写注册表实例的相关文章

手机页面
收藏网站 回到头部