Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing values to forms
Message
From
16/05/2002 21:11:56
Ron Hodge
Sebrex Systems, Inc.
Dacula, Georgia, United States
 
 
To
16/05/2002 10:54:26
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00657241
Message ID:
00657950
Views:
22
Mike,
What you're saying is exactly what I want to do, but I haven't been able to figure the syntax to do it. What I'm currently doing in the calling form (batentry) is:

Public Shared Imd_CC, Imd_Check, etc.

and then in the called form:

Dim bat As New Batentry()

and then refer to the values as bat.imd_cc, etc.

This seems a bit of a clumsy way, to make variables public in order to do this. I'd prefer to do as in FoxPro: DO FORM WITH IMD_CC, etc, or refer back to the calling form's properties without them being public. Part of the problem I see with my current approach is that is presumes only one instance of batentry will be running, and for a couple forms that that may not be the case.

So can you steer me toward the syntax to pass an object reference from the calling form to the called form, or pass parameters to the constructor, that would be much appreciated. For the latter, are you referring to something like:

Dim frmAuditBatch As New auditbatch(var1,var2,etc)

and in the called program's NEW method:

Public Sub New(ByVal sender As Object)
or
Public Sub New(ByVal var1 as integer, etc)

MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

I haven't tried modifying the constructor.

Thanks
Ron Hodge
Sebrex Systems, Inc.
Atlanta, GA
Previous
Reply
Map
View

Click here to load this message in the networking platform