I am trying to get my little program to do some calculations.
So far i got 15 textboxes, named TxtPP(followed by product type),so i got TxtPPproduct1, TxtPPproduct2 etc....
At the bottom of the form i got a disabled textbox which shows the total of all the above textboxes.
Now i don't want to use a button to click when doing the calculations.
I want this to be done every time a value is added to one of the textboxes(so on lost focus).
Public Class Form1
Private iTotal As Integer '// used to add up the Total of all Product TextBoxes.
'// renamed from: TxtPPproduct1_TextChanged
Private Sub myCoolTextBoxes_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles TxtPPproduct1.TextChanged, TxtPPproduct2.TextChanged, TxtPPproduct3.TextChanged '// add remaining TextBoxes here.
iTotal = 0 '// reset.
For Each ctl As Control In Me.Controls '// loop thru all controls on Form.
If TypeOf ctl Is TextBox And ctl.Name.StartsWith("TxtPPproduct") Then '// locate TextBoxes that .Name.StartsWith...
If Not ctl.Text = "" Then iTotal += CInt(ctl.Text) '// if not a empty value in TextBox, add to Total.
txtTOTAL.Text = CStr(iTotal) '// Display total in your TOTAL TextBox.
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...