dalam contoh ini saya menggunakan 2 command button dan sebuah textbox
Imports Microsoft.Win32
Private Sub btnTes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTes.Click
Dim write As RegistryKey = Registry.LocalMachine.OpenSubKey("Software", True)
Dim key As RegistryKey = write.CreateSubKey("Tes")
Try
key.SetValue("program", Text1.Text)
Me.Close()
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
Private Sub btnTes2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTes2.Click
Dim read As RegistryKey = Registry.LocalMachine
Try
read = read.OpenSubKey("Software\\Tes")
Text1.text = read.GetValue("program")
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
untuk melihat hasilnya melalui regedit, selamat mencoba,,,,,,, semoga bermanfaat
Grand Theft Auto 4 Cheats
11 tahun yang lalu
Tidak ada komentar:
Posting Komentar