0% found this document useful (0 votes)
16 views1 page

Codigos Vbnet

This code defines a form with radio buttons for selecting gender, checkboxes for selecting interests, and buttons to display selections. When the form loads, it preselects "woman" and "theater". The buttons show messages for the selected gender or interests. Selections are stored in variables and displayed in messages.

Uploaded by

oatasi2
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Codigos Vbnet

This code defines a form with radio buttons for selecting gender, checkboxes for selecting interests, and buttons to display selections. When the form loads, it preselects "woman" and "theater". The buttons show messages for the selected gender or interests. Selections are stored in variables and displayed in messages.

Uploaded by

oatasi2
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Private Sub Form1_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
mujer.Checked = True
RadioButton5.Text = "maestria"
CheckBox3.Text = "teatro"
CheckBox1.Checked = True
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
If varon.Checked = True Then
MessageBox.Show("eligio varon")
End If
If mujer.Checked = True Then
MessageBox.Show("eligio mujer")
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
Dim i As Integer
If varon.Checked = True Then
i = 1
Else
i = 2
End If

Select Case i
Case 1
MessageBox.Show("es varon")
Case 2
MessageBox.Show("es mujer")
End Select
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
Dim resultado As String = ""
If CheckBox1.Checked = True Then
resultado = resultado + CheckBox1.Text
End If
If CheckBox2.Checked = True Then
resultado = resultado + " " + CheckBox2.Text
End If
If CheckBox3.Checked = True Then
resultado = resultado + " " + CheckBox3.Text
End If
MessageBox.Show(resultado)
End Sub
End Class

You might also like