Post[Visual Basic] Need Help

Posts 12 of 2 · Page 1 of 1
[Visual Basic] Need Help
Hey guys,i just had written a code and now i need to see a key in the registry
and every time i debugged it and clicked on the button i became the message : Invalid Cast from type Byte () to String.
This is my code:

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

TextBox5.Text = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\ SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA","Key", False)

End Sub

Maybe u can help me maybe not
Thanks
P.S. sorry for my bad english
(My inglüsh is propper inglüsh )
ok, here i remember this from my cursor program...

Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim readValue As String
        readValue = My.Computer.Registry.GetValue _
        ("HKEY_LOCAL_MACHINE\  SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA","Key", Nothing)
        TextBox1.Text = "" & readValue
    End Sub
i try your code. it works just fine... make sure "Key" is your file name... make sure you have the right location. other than that not sure..
Posts 12 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?