vb.net - Connect this to a form to have an incrementing label when the radio button is clicked -


this program in vb.net 2012 have made project. hope can me.

i have tried code in inventory button code, not work.

dim rad1 string = 0 dim rad2 string = 0 dim rad3 string = 0 dim rad4 string = 0 dim rad5 string = 0 dim rad6 string = 0 dim rad7 string = 0 dim rad8 string = 0  dim siomairice string dim friedsiomai string dim siomai string dim threesiomai string dim coke string dim sprite string dim rc string dim sevenup string  if rad1 = rads2.checked     siomairice = rad1     siomairice = siomairice + 1     siomairice = form5.label1.text end if if rad2 = rads2.checked     friedsiomai = rad2     friedsiomai = friedsiomai + 1     friedsiomai = form5.label2.text end if if rad3 = rads3.checked     siomai = rad3     siomai = siomai + 1     siomai = form5.label3.text end if if rad4 = rads4.checked     threesiomai = rad3     threesiomai = threesiomai + 1     threesiomai = form5.label4.text end if if rad5 = radd1.checked     coke = rad5     coke = coke + 1     coke = form5.label5.text end if if rad6 = radd2.checked     sprite = rad6     sprite = sprite + 1     sprite = form5.label6.text end if if rad7 = radd3.checked     rc = rad7     rc = rc + 1     rc = form5.label7.text end if if rad8 = radd4.checked     sevenup = rad8     sevenup = sevenup + 1     sevenup = form5.label8.text end if 

it not have error or warning in program not have response when click it.

this code never work. example if rad1 = rads2.checked then-- rad1 string value of "0". assume rads2.checked radio button property, boolean. comparing string value "0" , boolean, true or false in string equivalent. so, code inside if never execute

second issue, example

siomai = form5.label3.text 

if want display text on label, needs

form5.label3.text = siomai  

third issue - whole logic crazy. should this:

private _rad1clicks integer  private sub rad1_click (sender object, e eventargs) handles rad1.click     _rad1clicks += 1     myform.mylabel.text = _rad1clicks.tostring() end sub 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -