efk_715 Posted March 11, 2011 Share Posted March 11, 2011 (edited) Öncelikle herkese merhaba!Benim sorunum vşsual basic deki bir soru bankası programı ile ilgili.Forumda visual basic programlama bilen abilerimizin olduğunu biliyorum ve onlardan yardım istiyorum.Daha önce bir zil programı ile ilgili sorunumu burada belirtmiştim.Sağolsun bilgtron isimli abimiz yardım etti ve sorunuma çözdü.ona buradan çok teşekkür ediyorum. Benim anlatmak istediğim testin cevaplarını kontrol ederken sayıya göre değil checkboxların yanlışlık durumuna göre değerlendirip yanlış sayısını otomatik olarak label2 ye yazmasını istiyorum.Çok uğraştım yapamadım.yardım edermisiniz. [img]http://i1103.hizliresim.com/2011/3/11/11589.jpg[/img] [img]http://i1103.hizliresim.com/2011/3/11/11695.jpg[/img] Edited March 11, 2011 by efk_715 Quote Link to comment Share on other sites More sharing options...
Scarecrow Posted March 11, 2011 Share Posted March 11, 2011 (edited) Şimdi anladığıma göre doğru sayısını label1 göstericek ve yanlış sayısınıda label2, bu durumda şöyle bir kod deneyebilirsin. Mantık şöyle:Doğru olan şıkkı belirleyeceksin örneğin ben checkbox2 yi doğru kabul ettim.Diğer şıklar işaretliyse yanlış sayısı bir artacak,sadece doğru şık işaretli ise doğru sayısı bir artacak çok aceleyle yazdım.Daha düzenli kodlar yazılabilir. [code]Dim dogru As Integer dogru = 0 Dim yanlis As Integer yanlis = 0 If CheckBox2.Checked = True And CheckBox1.Checked = False And CheckBox3.Checked = False And CheckBox4.Checked = False Then dogru = dogru + 1 Label1.Text = "Doğru :" + dogru.ToString() Else yanlis = yanlis + 1 Label2.Text = "Yanlış :" + yanlis.ToString End If[/code] Edit : Bu arada konu yanlış yerde Autoit Bölümüne açmışsın. Edited March 11, 2011 by Scarecrow Quote Link to comment Share on other sites More sharing options...
bilgitron Posted March 11, 2011 Share Posted March 11, 2011 labelları toplat. yani label2.text= label2.text +1 gibi tümünde kontrollere koyman gerekir. Quote Link to comment Share on other sites More sharing options...
yunus_28 Posted March 11, 2011 Share Posted March 11, 2011 biraz daha açıklayabilirmisin ayrıca tasarım ekranın bi resmini göstersen Quote Link to comment Share on other sites More sharing options...
efk_715 Posted March 12, 2011 Author Share Posted March 12, 2011 (edited) tamamdır sorunum çözüldü.ilgilendiğiniz için hepinize çok teşekkür ediyorum. bu arada programlamada vb bölümü yok o yüzden autoit e açmıştım. Edited March 12, 2011 by efk_715 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.