- Pass value from one form to another form
- In Form 1, copy this code to button click event:
- In Form 2, copy this code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim frm As New Form2()
frm.idinF2 = Me
frm.ShowDialog()
End Sub
Public Class Form2
Inherits System.Windows.Forms.Form
Public idincom As applicantedit
Public Sub New()
InitializeComponent()
End Sub
Public Sub New(strParam As String)
InitializeComponent()
Me.pid.Text = strParam
End Sub
Private Sub passportmenu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.pid.Text = DirectCast(Me.idincom, applicantedit).naid.Text
End Sub
End Class
No comments:
Post a Comment