Ahmad,
Here's an example from my code in the calling program:
'load AuditBatch screen
Dim frmAuditBatch As New auditbatch(Me, Current_BatchNo)
Me.Hide()
frmAuditBatch.ShowDialog()
Me.Show()
In the auditbatch form I have:
- put in by Windows form generator:
Public Class auditbatch
Inherits System.Windows.Forms.Form
Private frmCalling As Object
Private This_BatchNo As Integer
#Region " Windows Form Designer generated code "
Public Sub New(ByVal sender As System.Object, ByVal Curr_Batch As Integer)
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
frmCalling = sender
This_BatchNo = Curr_Batch
End Sub
The object constructor is the "New" procedure for the object, in this case the form. I've included a bit more than the New() procedure to show how
this works. I hope this helps.
Ron
p.s. - Stay safe there.
Ron Hodge
Sebrex Systems, Inc.
Atlanta, GA