8 Ekim 2014 Çarşamba

Vb.net Kayıt Defteri Ayarlama

İlk Önce NameSpace mizi Çağılarım

imports Microsoft.Win32

Kayıt Defteri Anahtarı Oluşturmak İçin


My.Computer.Registry.CurrentUser.CreateSubKey("MyTestKey")

hkey current user altında mytestkey adında bir anahtar oluşturduk bu kodlarıda buton nun click olayına yazarsanız denemesi kolay olur.

burada ise kayıt defterindeki dizeleri ayarlıyacagımız kod
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\MyTestKey",MyTestKeyValue", "This is a test value.")

Bu Kod İlede Dize Okuma İşelemini yapıyoruz.
Dim readValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp", "Name", Nothing)
MsgBox("The value is " & readValue)

0 yorum:

Yorum Gönder