Private Sub ขอมลรบเขาToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ขอมลรบเขาToolStripMenuItem.Click
Dim NewMDIChilds As New frmreceivepro
'Set the parent form of the child window.
NewMDIChilds.MdiParent = Me
'Display the new form.
NewMDIChilds.Show()
End Sub
ที่ฟอร์ม 2
Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm As New frmcodeprodel
frm.ShowDialog()
End Sub
ที่ฟอร์ม3 Code
Private Sub CodeproductDataGridView_DoubleClick1(ByVal sender As Object, ByVal e As System.EventArgs) Handles CodeproductDataGridView.DoubleClick
frmreceivepro.txtcode2.Text = Me.CodeproductDataGridView.Item(0, Me.CodeproductDataGridView.CurrentRow.Index).Value
frmreceivepro.txtname.Text = Me.CodeproductDataGridView.Item(1, Me.CodeproductDataGridView.CurrentRow.Index).Value
frmreceivepro.txtstocka.Text = Me.CodeproductDataGridView.Item(2, Me.CodeproductDataGridView.CurrentRow.Index).Value
frmreceivepro.txtsafety.TabIndex = 0
frmreceivepro.txtsafety.Focus()
frmreceivepro.txtsafety.SelectAll()
Me.Close()
End Sub