VB操作注册表:
http://www.sqreg.com/file/vb/reg_01.htm
http://www.sqreg.com/file/vb/reg_02.htm
http://www.sqreg.com/file/vb/reg_03.htm
http://www.sqreg.com/file/vb/reg_04.htm
http://www.sqreg.com/file/vb/reg_05.htm
http://www.sqreg.com/file/vb/reg_06.htm
http://www.sqreg.com/file/vb/reg_07.htm
http://www.sqreg.com/file/vb/reg_01.htm
http://www.sqreg.com/file/vb/reg_02.htm
http://www.sqreg.com/file/vb/reg_03.htm
http://www.sqreg.com/file/vb/reg_04.htm
http://www.sqreg.com/file/vb/reg_05.htm
http://www.sqreg.com/file/vb/reg_06.htm
http://www.sqreg.com/file/vb/reg_07.htm
这涉及到的知识也不多,思维也简洁,也很容易。只是麻烦一些。有高手可能知道更好的办法。
Declare Function RegOpenKey Lib "advapi32" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
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
Declare Function OSRegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal Hkey As Long, ByVal lpszValueName As String, ByVal dwReserved As Long, lpdwType As Long, lpbData As Any, cbData As Long) As Long' 改变当前window系统的日期习惯为"yyyy-MM-dd",需要重新启动
i = start.RegOpenKey(HKEY_USERS, ".DEFAULT\Control Panel\International\", lhkey)
RegSetStringValue lhkey, "sShortDate", "yyyy-MM-dd", False
bSuccess = RegQueryStringValue(lhkey, "sShortDate", sStr)