Sei sulla pagina 1di 4

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.

Click
Const A As Double = 1.0
Const B As Double = 1.0
Const C As Double = 1.0
Const D As Double = 1.0
Const F As Double = 1.0
Const G As Double = 1.0
Const H As Double = 1.0
Const I As Double = 1.0
Const J As Double = 1.0
Const K As Double = 1.0
Dim Sum As Double
If RadioButton1.Checked = True Then
Sum += A
End If
If RadioButton5.Checked = True Then
Sum += B
End If
If RadioButton10.Checked = True Then
Sum += C
End If
If RadioButton15.Checked = True Then
Sum += D
End If
If RadioButton20.Checked = True Then
Sum += F
End If
If RadioButton21.Checked = True Then
Sum += G
End If
If RadioButton25.Checked = True Then
Sum += H
End If
If RadioButton31.Checked = True Then
Sum += I
End If
If RadioButton34.Checked = True Then
Sum += J
End If
If RadioButton39.Checked = True Then
Sum += K
End If

TextBox1.Text = Sum
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False
RadioButton4.Checked = False
RadioButton5.Checked = False
RadioButton6.Checked = False
RadioButton7.Checked = False
RadioButton8.Checked = False
RadioButton9.Checked = False
RadioButton10.Checked = False
RadioButton11.Checked = False
RadioButton12.Checked = False
RadioButton13.Checked = False
RadioButton14.Checked = False
RadioButton15.Checked = False
RadioButton16.Checked = False
RadioButton17.Checked = False
RadioButton18.Checked = False
RadioButton19.Checked = False
RadioButton20.Checked = False
RadioButton21.Checked = False
RadioButton22.Checked = False
RadioButton23.Checked = False
RadioButton24.Checked = False
RadioButton25.Checked = False
RadioButton26.Checked = False
RadioButton27.Checked = False
RadioButton28.Checked = False
RadioButton29.Checked = False
RadioButton30.Checked = False
RadioButton31.Checked = False
RadioButton32.Checked = False
RadioButton33.Checked = False
RadioButton34.Checked = False
RadioButton35.Checked = False
RadioButton36.Checked = False
RadioButton37.Checked = False

RadioButton38.Checked = False
RadioButton39.Checked = False
RadioButton40.Checked = False
TextBox1.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
End
End Sub Less...

his is the Code for Checkbox Font Style


Public Class Form1
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox1.CheckedChanged
If CheckBox1.Checked Then
TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style Or FontStyle.Bold)
Else
TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style And Not FontStyle.Bold)
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End
End Sub
Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox2.CheckedChanged
If CheckBox2.Checked Then
TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style Or FontStyle.Italic)
Else

TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style And Not FontStyle.Italic)


End If
End Sub
Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox3.CheckedChanged
If CheckBox3.Checked Then
TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style Or FontStyle.Underline)
Else
TextBox1.Font = New Font(TextBox1.Font, TextBox1.Font.Style And Not FontStyle.Underline)
End If
End Sub
Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox4.CheckedChanged
If CheckBox1.CheckState = CheckState.Checked Then
TextBox1.Font = _
New Font(TextBox1.Font, FontStyle.Regular)
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Text = " "
End Sub
End Class Less

Potrebbero piacerti anche