غير اسم :
TextBox21 إلى tTextBox21
TextBox22 إلى tTextBox22
واستخدم بدلا من الكود السابق الكود التالي :
TextBox21 إلى tTextBox21
TextBox22 إلى tTextBox22
واستخدم بدلا من الكود السابق الكود التالي :
كود :
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) _
Handles TextBox1.TextChanged, TextBox2.TextChanged,
TextBox3.TextChanged, TextBox4.TextChanged,
TextBox5.TextChanged, TextBox6.TextChanged,
TextBox7.TextChanged, TextBox8.TextChanged,
TextBox9.TextChanged, TextBox10.TextChanged
For Each tx As TextBox In (From t1 In Controls.OfType(Of TextBox)()
Where t1.Name = "TextBox" & (Val(sender.Name.ToString.Replace("TextBox", "")) + 10))
tx.Text = Val(sender.text) * (3 + Val(sender.Name.ToString.Replace("TextBox", "")))
Next
tTextBox21.Text = (From t1 In Controls.OfType(Of TextBox)() Where Val(t1.Name.ToString.Replace("TextBox", "")) > 10).Sum(Function(t1) Val(t1.Text))
tTextBox22.Text = Strings.Right(tTextBox21.Text, 2)
End Subقال صلى الله عليه وسلم:
«كلمتان خفيفتان على اللسان
ثقيلتان في الميزان،حبيبتان إلى الرحمن:
سبحان الله وبحمده، سبحان الله العظيم».
