Well, lets go to my problem.
I really have time to loose but i want to make it.
The programme is for calculating an amount of fruit.
I have a label saying the name of the fruit, a textbox to enter a value of 0-99
and another textbox with ReadOnly wich will show the price.
A little picture here:
http://img94.imagesh...anstitre1rs.jpg
Ok, as you can see, the Fruit1 Etc... Is only the fruit name.
The Text box wich indicate 1-99 means the number of fruit.
The Textbox with Cash on it, means the total price.
The Calaculate button, when i will puch it, all the total price from all the fruit will be added together to form a total price wich will be indicated in the total price textbox under the Calculate button.
When i will enter the number of fruit, if i enter 99, it give me a price.
When i will enter 60, i want that the 60 are multiplyed by (let say) 0,10$
I just like to know how i can do this... Its really bothering e and i don;t want to calculate all the things and make 99 line for 1 fruit cause it will be long.
I don't know if you understand what am saying.
The code i was using was:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If TextBox1.Text = "99" Then TextBox2.text = "10.00$" Elseif TextBox1.Text = "98" Then TextBox2.Text = "9,90$" EndIf End Sub
Until the the number of the fruit in the code reach 0.
So its very very very long.
Its why i'd like to know if theres a code that can do it simply.
Thanks in advance!

New Topic/Question
Reply




MultiQuote





|