Dim B As New FmB Dim DgA As String = DataGridView1.CurrentRow.Cells("年齢").Value.ToString Dim DgB As String = DataGridView1.CurrentRow.Cells("名前").Value.ToString Dim DgA As String = DataGridView1.CurrentRow.Cells("住所").Value.ToString Dim DgB As String = DataGridView1.CurrentRow.Cells("性別").Value.ToString B.TextBox1.Text = DgA B.TextBox2.Text = DgB B.TextBox3.Text = DgC If DgD = "男性" Then B.Textbox4.text = 0 Else B.Textbox4.text = 1 End if B.show
Private Sub fmB(sender As System.Object, e As System.EventArgs) Handles MyBase.Load With ComboBox1 .Items.Add("男性") .Items.Add("女性") End With ComboBox1.SelectedIndex = Me.TextBox4.Text※ End Sub
Dim RPG As Integer Dim B As New FmB Dim DgA As String = DataGridView1.CurrentRow.Cells("年齢").Value.ToString Dim DgB As String = DataGridView1.CurrentRow.Cells("名前").Value.ToString Dim DgA As String = DataGridView1.CurrentRow.Cells("住所").Value.ToString Dim DgB As String = DataGridView1.CurrentRow.Cells("性別").Value.ToString B.TextBox1.Text = DgA B.TextBox2.Text = DgB B.TextBox3.Text = DgC If DgD = "男性" Then RPG = 1 B.TextBox4.Text = RPG Else RPG = 0 B.TextBox4.Text = RPG End If