PColik Posted February 26, 2017 Share Posted February 26, 2017 Merhaba arkadaşlar. Benim kullandığım ListBox'un her öğenin Data sında bir dosyanın yolu var. Örneğin isimde Chrome, Data da ise C:\Program Files (x86)\Google\Chrome\Application\chrome.exe yazıyor. Bu öğeye çift tıklayınca Google Chrome açılıyor. Benim yapmak istediğim ise şu: Projede bir de CheckBox var. CheckBox da şu kodu kullandım: checkbox = CheckBox.GetChecked(this); if checkbox == true then -- Aktif edildiğinde çalışacak kod ListBox.DeleteItem("ListBox1", -1); deger = Registry.GetKeyNames(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"); if (deger ~= nil) then for i,j in pairs(deger) do value = String.Replace(j, ".EXE", "", true); value = String.Replace(value, ".exe", "", true); ListBox.AddItem("ListBox1", value, ""); end end -- else -- Deaktif edildiğinde çalışacak kod ListBox.DeleteItem("ListBox1", -1); deger = INIFile.GetValueNames("AutoPlay\\Docs\\kayitlar.ini", "Kayıtlar"); if (deger ~= nil) then for i,v in pairs(deger) do veri = INIFile.GetValue("AutoPlay\\Docs\\kayitlar.ini", "Kayıtlar", v); ListBox.AddItem("ListBox1", v, veri); end end -- end Buna göre HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\ konumundaki bütün öğeleri ListBox a ekliyor. Fakat sadece ismini ekliyor. Bu girdide ki bütün anahtarların varsayılan değerlerinde tıpkı chrome gibi bir öğenin konumu var. Bu konumlarda ListBox da her öğenin kendi Data sına eklenecek. Bunu yapamadım. Yardımcı olur musunuz? Teşekkürler. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted February 26, 2017 Share Posted February 26, 2017 döngünün içindeki şu kodu ListBox.AddItem("ListBox1", value, ""); şunla değiştirirsen sanırım istediğin olacak: ListBox.AddItem("ListBox1", value, j); 1 Quote Link to comment Share on other sites More sharing options...
PColik Posted February 28, 2017 Author Share Posted February 28, 2017 (edited) On 26.02.2017 at 21:15, KintaRo yazdı: döngünün içindeki şu kodu ListBox.AddItem("ListBox1", value, ""); şunla değiştirirsen sanırım istediğin olacak: ListBox.AddItem("ListBox1", value, j); Hocam çok sağol ya o kadar bilgim yok benim, sadece dört işlemi bilen matematikçi gibiyim. Çok sağol tekrar Düzenleme: Hocam bir de takıldığım başka bir yer çıktı burdan sana sorabilir miyim yoksa yeni konu mu açayım? Edited February 28, 2017 by PColik Quote Link to comment Share on other sites More sharing options...
KintaRo Posted February 28, 2017 Share Posted February 28, 2017 yoo devam edebiliriz buradan Quote Link to comment Share on other sites More sharing options...
PColik Posted March 1, 2017 Author Share Posted March 1, 2017 On 01.03.2017 at 23:11, KintaRo yazdı: yoo devam edebiliriz buradan Sağolasın. Diğer sorunum farklı bir konuyla ilgili. Ben projemde ki, örneğin Label1 için Advent isimli bir yazı tipi kullanıyorum. Bunu başka bir bilgisayarda sorunsuz görüntülemek için o bilgisayarda da Advent fontunun yüklü olması lazım. Ben istiyorum ki, Advent fontunu Docs klasörüne atayım, yazı tipini oradan çeksin, bilgisayarda yüklü olmasa bile o yazı tipiyle göstersin yazıyı. Bu yapılabilir mi? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted March 1, 2017 Share Posted March 1, 2017 System.RegisterFont() ile yapılıyor sanıyorum. AMS kurulu değil deneyemedim. 1 Quote Link to comment Share on other sites More sharing options...
PColik Posted March 5, 2017 Author Share Posted March 5, 2017 On 01.03.2017 at 22:35, KintaRo yazdı: System.RegisterFont() ile yapılıyor sanıyorum. AMS kurulu değil deneyemedim. Deneyip mesaj atıcam hocam sağolun. Peki bunu Actions>OnStartup kısmında mı kullanmam gerekiyor? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted March 5, 2017 Share Posted March 5, 2017 yani o event iyi olur, çünkü form henüz yüklenmediği için fontu kaydettirmek mantıklı. 1 Quote Link to comment Share on other sites More sharing options...
PColik Posted March 6, 2017 Author Share Posted March 6, 2017 22 saat önce, KintaRo yazdı: yani o event iyi olur, çünkü form henüz yüklenmediği için fontu kaydettirmek mantıklı. İşe yaradı hocam, sağol. Require Administrator seçeneği devre dışıyken çalışmıyor ama. Oda benimle ilgili değil zaten 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.