|
-
Feb 9th, 2003, 11:11 AM
#1
Thread Starter
New Member
<---Absolute n00b Please help me *[Resolved]*
All i am doing is trying to get my head around the new syntax for VERY simple things, such as moving between forms and then back again, i can go from form1 to form2 using this:
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
finalize() 'or i could hide it with me.hide
form2.StartPosition = FormStartPosition.CenterScreen
form2.Show()
End Sub
but i want to be able to unload the form like the way you can in VB6 and then be able to open it again later so i can make a welcome page for example
Last edited by breemer; Feb 9th, 2003 at 01:17 PM.
-
Feb 9th, 2003, 11:14 AM
#2
Member
Re: <---Absolute n00b Please help me
Originally posted by breemer
All i am doing is trying to get my head around the new syntax for VERY simple things, such as moving between forms and then back again, i can go from form1 to form2 using this:
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
finalize() 'or i could hide it with me.hide
form2.StartPosition = FormStartPosition.CenterScreen
form2.Show()
End Sub
but i want to be able to unload the form like the way you can in VB6 and then be able to open it again later so i can make a welcome page for example
in form1 on button click
dim f as new form2
Me.Hide
f.Show
-
Feb 9th, 2003, 11:36 AM
#3
Thread Starter
New Member
i have tried that before but when i want to show it again using f1.show (or whatever) it shows me this:
An unhandled exception of type 'System.NullReferenceException' occurred in Between Forms.exe
Additional information: Object reference not set to an instance of an object.
-
Feb 9th, 2003, 12:57 PM
#4
Thread Starter
New Member
i can hide and re-show a form from itself using a timer i just cant show a form from a different form.
-
Feb 9th, 2003, 01:06 PM
#5
Lively Member
'Create a module:
Module Module1
Public F1 As New Form1()
Public F2 As New Form2()
End Module
' Add this to form1 button click event
F2.Show()
Me.Hide()
' Add this to form2 button click event
F1.Show()
Me.Hide()
-
Feb 9th, 2003, 01:16 PM
#6
Thread Starter
New Member
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
|