Jump to content

Registrydeki Kayıta Göre Checkbox Durumunu Dğitrme


PColik
 Share

Recommended Posts

arkadaşlar ben registry get.value ile registry den kayıt alıcam. checkbox 1 şu kodları yazdım;


if CheckBox.GetChecked(this, true) then
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run","Kolay_Ara.exe",_SourceFolder.."\\".._SourceFilename, REG_SZ)
else
Registry.DeleteValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Kolay_Ara.exe")
end

diyelim bu kodlara göre bilgisayar yeniden başlayınca Kolay_Ara.exe çalışıyor ama programı tekrar açtığımda eğer Kolay_Ara.exe başlangıçta varsa checkbox seçilmiş olucak. çünkü normalde pc yeniden başlayınca checkbox lar felan hep ilk halini alıyor.

şu kodla;

result = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Kolay_Ara.exe", true);

eğer registry'nin yukarıda verdiğim kısmında Kolay_Ara.exe varsa CheckBox1 seçilmiş olacak, yoksa seçilmiş olmayacak.

yardım edebilirmisiniz?
Link to comment
Share on other sites

[size="2"]Regedit/[font=verdana, tahoma, sans-serif]HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run[/font][/size]
[size="2"][font=verdana, tahoma, sans-serif]
[/font][/size]
[size="2"][font=verdana, tahoma, sans-serif]yukarıdaki yolda windows başlangıcında çalışan dosyalar var. örneğin RTHDCPL.exe, NvCplDaemon.exe vs.[/font][/size]
[font="verdana, tahoma, sans-serif"][size="2"]eğer yukarıdaki yolda Kolay_Ara.exe diye bir öğe var ise CheckBox1 seçilmiş olacak, eğer o yolda Kolay_Ara.exe diye bir dosya yok ise CheckBox1 seçili olmayacak[/size][/font]

Link to comment
Share on other sites

Ha şimdi oldu.Bunu bir dene ben çalışıyor mu denemedim.
[quote]
sKontrol = Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run","Kolay_Ara.exe",_SourceFolder.."\ \".._SourceFilename, REG_SZ")

if (sKontol) then
CheckBox.SetChecked("CheckBox1", true);
else
CheckBox.SetChecked("CheckBox1", false);
end[/quote]

Link to comment
Share on other sites

birde böyle dener misin ?

[quote]sKontrol = Registry.GetValue(HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/Kolay_Ara)

if (sKontol) then
CheckBox.SetChecked("CheckBox1", true);
else
CheckBox.SetChecked("CheckBox1", false);
end[/quote]

Link to comment
Share on other sites

[quote]Registry.GetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Kolay_Ara", true);
error = Application.GetLastError();
StatusDlg.Hide();
if error == 0 then
CheckBox.SetChecked("CheckBox1", true);
else
CheckBox.SetChecked("CheckBox1", false);
end[/quote]

Edited by ReaLyMaN
Link to comment
Share on other sites

[quote]Registry.GetValue() [/quote]

değeri almak için kullanılır. Size öyle bir anahtarın olup olmadığını kontrol eden bir komut lazım:

[quote]Registry.DoesKeyExist()[/quote]

Bu komut eğer anahtar mevcut ise true, değilse false dönüşünü verecektir.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...