View Full Version : Programming probs. in VB.net
Ive just been introduced to the wonderful world of programming and VB.net. Ive just started my first program and have already hit a snag. I am trying to write a program which will allow me to select a number of checkboxes, each with a seperate numeric value. The total of these must be displayed in a textbox.
Thanks :D
shifty.ricky
15-01-2004, 11:23
I dont know much about VB but hese how i would do it (just have to turn this into code)
Define a Global Var. (int) named say $var
Then for the checkboxes do an "on change" event.
On change
if checked then
{ $var := $var + 1 }
else
{ $var := $var - 1}
1 = value of box.
Then testbox would be:
textbox1.text := inttostr($var);
Im more used to using delphi which some of you might see and even i havent used that for nearly 2 years.
Thx for the speady reply. Ill give that a try and let you know how I get on. :p
Thx for the help Shifty.
Ive managed to sort the problem. I had already set the checkstate values, but as your post suggested, I had forgotten to set the value of Textbox1.
:eek: Oops!!
Thx again Shifty ;) .
shifty.ricky
19-01-2004, 18:27
Originally posted by War2879
Thx for the help Shifty.
Ive managed to sort the problem. I had already set the checkstate values, but as your post suggested, I had forgotten to set the value of Textbox1.
:eek: Oops!!
Thx again Shifty ;) .
I aim to please....
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.