Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing from Form to Sub Main
Message
From
17/03/2004 11:40:28
 
 
To
17/03/2004 10:16:07
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00887072
Message ID:
00887114
Views:
13
I'm going to make a few assumptions here. First assumption, that your frmStartup is a modal dialog. If so, you can grab properties from the form from your Sub Main. Something like this (please remember that I'm using a C#-to-VB converter so the syntax may be off a bit):
If frmStartup.ShowDialog() = DialogResult.OK Then
   Me.MyVariable = frmStartup.FormVariable
End If
and then pass it to your frmMain like this:
Dim oMainForm As New frmMain(Me.MyVariable)
oMainForm.Show()
of course, frmMain would need to declare parameters in it's constructor, like this:
Public Class frmMain
   Inherits System.Windows.Form
   
   ' Form's constructor
   Public Sub New(MyParm As String)
      ' code here to handle parm
      InitializeComponent()
   End Sub 'New
End Class 'frmMain
Anyway, that should be enough to get you started ...

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform