VB (Program Modul_3_No.1)

Public Class Form2

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

For Each x As RadioButton In GroupBox1.Controls
If x.Checked = True Then Label3.Text = x.Text
Next
For Each x As RadioButton In GroupBox2.Controls
If x.Checked = True Then Label4.Text = x.Text
Next
If Label3.Text = "" Or Label4.Text = "" Then
MessageBox.Show("Masukkan pilihan", "informasi")
End If
End Sub

End Class

Download...

Category: 0 komentar

Tidak ada komentar:

Posting Komentar