Dim hKey As Long, ret As Long
Dim Name As String
Dim aa As String * 256
Name = "iFormat"
ret = RegConnectRegistry("\\B机", HKEY_CURRENT_USER, lKey)
If ret = 0 Then
ret = RegOpenKey(lKey, "Software\Microsoft\Clock", hKey)
ret = RegQueryValueEx(hKey, Name, 0, REG_SZ, ByVal aa, 50)
ret = RegCloseKey(lKey)
ret = RegCloseKey(hKey)
aa = Replace(aa, Chr(1), "")
MsgBox aa
End If