-
1 Attachment(s)
User Control
I am about to begin a lot of equal calculations. User Controls are taylor made for that. But I have some problems realising this.
In my user control I have:
A label, lblDimension, with the dimensions varying from 20, 22, 25, 28 to 110 mm.
Two text boxes where I enter the energy supply, txtEnergy, and the length, txtLength.
And finally I have three labels which contain different calculations:
lblRes1.txt = CSng(lblDimension.txt * txtEnergy.txt + txtLength.txt)
lblRes2.txt = CSng(lblDimension.txt + txtEnergy.txt *txtLength.txt)
lblRes3.txt = CSng(lblDimension.txt - txtLength.txt*4)
How do I specify the value of lblDimension for each of the 20 different calculations?
I have attached a zip file which contains the complete Visual Studio Project.
-
Could you elaborate on this:
How do I specify the value of lblDimension for each of the 20 different calculations?
-
Hi, sorry for being unprecise. What I mean is that I wish to SET the lblDimension.text for each of the user controls.
UC1:
lblDimension.text = "20"
UC2:
lblDimension.text = "22"
UC3:
lblDimension.text = "25"
UC4:
lblDimension.text = "28"
and so on.