พอดีผมต้องการสร้าง RadioButton โดยกำหนดว่า ถ้า RadioButton1 = 3.5 แต่ถ้าเลือก RadioButton2 = 9.5
ประมาณนี้ แล้วเมื่อกดปุ่มคำนวณ ให้มันนำไปคูณ กับผลรวม ครับ
ส่วนอันนี้ ที่ผมเขียนไว้ แต่ยังไม่ได้ใส่ส่วน RadioButton
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
TextBox20.Text = CDbl((20 + 34 + TextBox03.Text + TextBox01.Text + TextBox03.Text + 34 + 20) *
(TextBox02.Text) * (TextBox04.Text) * (0.00000785)) + ((20 + 34 + TextBox03.Text + 15) *
(15 + TextBox01.Text + 15) * (TextBox04.Text) * (0.00000785) * (2)) +
((22 + TextBox01.Text + 22) * (22 + TextBox02.Text + 22) * (TextBox04.Text) *
(0.00000785)) + ((20 + TextBox01.Text + 20) * (20 + TextBox02.Text + 20) *
(TextBox04.Text) * (0.00000785))
TextBox19.Text = CDbl(TextBox20.Text) * (120) + (NumericUpDown05.Text * 60) + (NumericUpDown06.Text * 70) +
(NumericUpDown07.Text * 400) + (NumericUpDown08.Text * 120) + (NumericUpDown09.Text * 160) +
(NumericUpDown10.Text * 60) + (NumericUpDown11.Text * 50) + (NumericUpDown12.Text * 65) +
(NumericUpDown13.Text * 40) + (NumericUpDown14.Text * 50) + (NumericUpDown15.Text * 40) +
(NumericUpDown16.Text * 30) + (NumericUpDown17.Text * 120) + (NumericUpDown18.Text * 60)
Catch ex As Exception
MsgBox("Error")
End Try
End Sub
รบกวนช่วยทีครับ ผมไม่ค่อยเป็นอะไรเลย โพส์ผิดประการใด อภัยด้วยน่ะครับ มือใหม่
ต้องการสร้าง RadioButton ถ้า RadioButton1 = 3.5 ถ้าเลือก RadioButton2 = 9.5
ประมาณนี้ แล้วเมื่อกดปุ่มคำนวณ ให้มันนำไปคูณ กับผลรวม ครับ
ส่วนอันนี้ ที่ผมเขียนไว้ แต่ยังไม่ได้ใส่ส่วน RadioButton
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
TextBox20.Text = CDbl((20 + 34 + TextBox03.Text + TextBox01.Text + TextBox03.Text + 34 + 20) *
(TextBox02.Text) * (TextBox04.Text) * (0.00000785)) + ((20 + 34 + TextBox03.Text + 15) *
(15 + TextBox01.Text + 15) * (TextBox04.Text) * (0.00000785) * (2)) +
((22 + TextBox01.Text + 22) * (22 + TextBox02.Text + 22) * (TextBox04.Text) *
(0.00000785)) + ((20 + TextBox01.Text + 20) * (20 + TextBox02.Text + 20) *
(TextBox04.Text) * (0.00000785))
TextBox19.Text = CDbl(TextBox20.Text) * (120) + (NumericUpDown05.Text * 60) + (NumericUpDown06.Text * 70) +
(NumericUpDown07.Text * 400) + (NumericUpDown08.Text * 120) + (NumericUpDown09.Text * 160) +
(NumericUpDown10.Text * 60) + (NumericUpDown11.Text * 50) + (NumericUpDown12.Text * 65) +
(NumericUpDown13.Text * 40) + (NumericUpDown14.Text * 50) + (NumericUpDown15.Text * 40) +
(NumericUpDown16.Text * 30) + (NumericUpDown17.Text * 120) + (NumericUpDown18.Text * 60)
Catch ex As Exception
MsgBox("Error")
End Try
End Sub
รบกวนช่วยทีครับ ผมไม่ค่อยเป็นอะไรเลย โพส์ผิดประการใด อภัยด้วยน่ะครับ มือใหม่