I have problem on my program. How do i know if the registry subkey exist using Visual Basic 2005. I have here a code in Visual Basic 6.0, I don't know how use it in Visual Basic 2005. Can you please help me
Example:
'=============================================================
' This is a Visual Basic 6.0 code example
'=============================================================
Public Function DoesKeyExist(ByVal lngRootKey As Long, _
ByVal strRegKeyPath As String) As Boolean
Dim lngKeyHandle As Long
lngKeyHandle = 0
m_lngRetVal = RegOpenKey(lngRootKey, strRegKeyPath, lngKeyHandle)
If lngKeyHandle = 0 Then
DoesKeyExist = False
Else
DoesKeyExist = True
End If
m_lngRetVal = RegCloseKey(lngKeyHandle)
End Function
==> How can i use this in Visual Basic 2005

Registry Checker
plshn99
Private Function IsKeythere() As Boolean
If My.Computer.Registry.GetValue(cFullRegistryRoot, cRegistryAppSubkey, "KeyIsPresent") <> "KeyIsPresent" Then Else End If End Function
Thank you so much :)
Klaus-Dieter
Private
Function IsKeythere() As BooleanConst
cFullRegistryRoot As String = "HKey_Current_User\Software\"Const cRegistryAppSubkey As String = "Mytoolbar"
If My.Computer.Registry.GetValue(cFullRegistryRoot, cRegistryAppSubkey, "KeyIsPresent") <> "KeyIsPresent" Then Else End If End Function
kebabbert