Private Sub CheckBox1_CheckStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckStateChanged
If CheckBox1.Checked = True Then
Dim _form5 As New Form5()
Me.AddOwnedForm(_form5)
_form5.recogervariables2(
"Label2.text", "Label26.text")
_form5.Show()
End If
En este codigo mando los nombre de las variables a otro formulario Hijo
Friend
Sub recogervariables2(ByVal val1, ByVal val2)
Dim _pago, _modo As String
_pago = val1
_modo = val2
End Sub
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pagostr As String
Dim pago, _pago As Decimal
Dim modo As String
If RadioButton1.Checked = True Then
pago = 50 * 10
pagostr = Str(Math.Round(pago, 2))
modo =
"Hora"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton2.Checked = True Then
pago = (19.5 * Val(TextBox1.Text)) * 2
pagostr = Str(Math.Round(pago, 2))
modo =
"Folio computo"
CType(Me.Owner, Form3).Label6.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton3.Checked = True Then
pago = (20 * Val(TextBox2.Text)) * 2
pagostr = Str(Math.Round(pago, 2))
modo =
"Folio Especial"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton4.Checked = True Then
pago = (22 * Val(TextBox1.Text)) * 2
pagostr = Str(Math.Round(pago, 2))
modo =
"Folio Ingles"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton5.Checked = True Then
pago = (19.5 * Val(TextBox1.Text)) * 2
pagostr =
"300"
modo =
"G. 1 Alumno"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton6.Checked = True Then
pago =
"20"
pagostr = Str(Math.Round(pago, 2))
modo =
"Recuperacion"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
ElseIf RadioButton6.Checked = True Then
pago =
"20"
pagostr = Str(Math.Round(pago, 2))
modo =
"Recuperacion"
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
End If
End Sub
Lo que yo quiero es que en este codigo
CType(Me.Owner, Form3).Label2.Text = "$" & pagostr
CType(Me.Owner, Form3).Label26.Text = modo
yo pueda meter las variables que me paso el otro formulario
_form5.recogervariables2("Label2.text", "Label26.text")
Friend Sub recogervariables2(ByVal val1, ByVal val2)
Dim _pago, _modo As String
_pago = val1
_modo = val2
End Sub
E insertar las variables algo asi
CType(Me.Owner, Form3)._pago= "$" & pagostr
CType(Me.Owner, Form3)._modo = modo
Oviamente este codigo no funciona, Ayuda, Gracias