pass a result from a button click in form1 to a label in form 2

  • Thread starter Thread starter Nelson Fana
  • Start date Start date
N

Nelson Fana

Guest
Form1
Public Sub button_MenuClicked(ByVal sender As Object, e As System.EventArgs) Handles btnListaEmbutidos.Click, btnListaCroquetas.Click, btnListaJamonSerrano.Click, btnListaCeviche.Click, btnListaSalpicon.Click, btnListaQuesos.Click, btnListaEnsaladas.Click, btnListaSopas.Click, btnListaCoctelCamarones.Click

' Dim mybutton As Button = DirectCast(sender, Button)
' mybutton.Name = myform2.lblSeleccion.Text

'End Sub


Form2
Public Class frmSelectEntradas

ReadOnly myform As frmMainFoodMenu

Public Sub frmSelectEntradas_Load(sender As Object, e As EventArgs) Handles Me.Load
lblSeleccion.Text = myform.mybutton.name
End Sub

Private Sub button2_Click(sender As Object, e As EventArgs) Handles btnVolver.Click
Close()
End Sub


End Class

Continue reading...
 
Back
Top