Search code examples
vb.netwinformspanel

I have multiple panels on same form and I want Passing a value between 2 panel


I have multiple panels on the same form and I want Passing a value between 2 panels

I want to enter Username in the first panel and Show as Label in next panel

please not in between 2 Form but 2 Panels.

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Guna.UI.Lib.GraphicsHelper.ShadowForm(Me)
End Sub

Private Sub GunaButton1_Click(sender As Object, e As EventArgs) Handles GunaButton1.Click
    pnLogin.BringToFront()
    GunaTransition1.Hide(pnLogin)
End Sub

Private Sub GunaButton2_Click(sender As Object, e As EventArgs)
End Sub

Private Sub GunaGradientButton2_Click(sender As Object, e As EventArgs)

End Sub

Private Sub GunaTextBox1_Click(sender As Object, e As EventArgs) Handles GunaTextBox1.Click

End Sub

End Class


Solution

  • If all the controls are in the same Form, then the container they are within is irrelevant.

    The code would look something like this:

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label1.Text = TextBox1.Text
    End Sub
    

    You need to change the control names to what you have on your form for the Button, TextBox and Label.