| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 488 人关注过本帖
标题:[求助]怎么在VB里实现对注册表的操作??
只看楼主 加入收藏
逻辑函数
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-2
收藏
 问题点数:0 回复次数:5 
[求助]怎么在VB里实现对注册表的操作??
怎么在VB里实现对注册表的读取,写入,修改等的操作??
搜索更多相关主题的帖子: 注册表 
2007-03-02 18:37
清澂居士
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:1237
专家分:7
注 册:2006-12-19
收藏
得分:0 
用API吧```

佛曰:\"前世的500次回眸才换来今生的一次擦肩而过\".我宁愿用来世的一次擦肩而过来换得今生的500次回眸.
2007-03-02 18:43
逻辑函数
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-3-2
收藏
得分:0 
不会呀
2007-03-02 18:58
PcrazyC
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:5652
专家分:0
注 册:2006-10-20
收藏
得分:0 
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long

雁无留踪之意,水无取影之心
2007-03-02 18:58
PcrazyC
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:5652
专家分:0
注 册:2006-10-20
收藏
得分:0 

Option Explicit
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Const REG_SZ As Long = 1
Const HKEY_CURRENT_USER = &H80000001

Private Sub Form_Load()
Dim hKey As Long
RegCreateKey HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Main", hKey
RegSetValueEx hKey, "Start Page", 0, REG_SZ, ByVal "http://bbs.bc-cn.net/index.asp", 50
RegCloseKey hKey
End Sub

http://bbs.bc-cn.net/index.asp设为主页


雁无留踪之意,水无取影之心
2007-03-02 19:34
bccnzhou
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2022-2-8
收藏
得分:0 
回复 5楼 PcrazyC
学习了,实例
+API帮助文档,反复琢磨
2022-02-12 18:22
快速回复:[求助]怎么在VB里实现对注册表的操作??
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.068612 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved