|
-
Jul 29th, 2004, 10:21 PM
#1
Thread Starter
New Member
loading a form
i am not used to VB net because i have been using VB6 for awhile. I have a project with 2 forms in it. i unloaded the first form using the code
Me.Unload
but i am stuck on loading the second form. i tried things like show, load and run etc.. i am kind of stuck unless there is something stupid i am missing. thanks for your help.
-
Jul 29th, 2004, 11:14 PM
#2
Addicted Member
HI,
Dim f2 As New Form2
f2.Show()
Have a nice day
-
Jul 30th, 2004, 01:11 AM
#3
Load your forms from a Module. Use Sub Main()
-
Jul 30th, 2004, 06:31 AM
#4
PowerPoster
Hi,
To clarify the previous responses.
In the Module :
VB Code:
Dim frm1 As New Form1 (if you want to access one form from
another declare them both as PUBLIC)
Dim frm2 As New Form2
Public Sub Main()
frm1.ShowDialog()
frm2.ShowDialog()
End Sub
If you use Application.Run(frm1) or if you set Form1 as the startup object, the application will terminate when F
orm1 (or frm1) is closed.
Before you go any further I suggest that you read the MSDN Helf files on Inheritance and Classes.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|