|
-
Nov 16th, 2002, 08:32 PM
#1
Thread Starter
Hyperactive Member
close form2 from form1
I have the following code in a command button in form1:
Code:
Dim frm As New Form2()
frm.Close()
How can i close form2 using a command button on form1?
-
Nov 16th, 2002, 09:23 PM
#2
You can't, unless you have access to an instance of it.
Is form2 loaded by form1?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 17th, 2002, 01:53 AM
#3
Thread Starter
Hyperactive Member
yes, i believe in the form1.load, i have a form2.show()
-
Nov 17th, 2002, 04:40 PM
#4
Sleep mode
If I didn't get it wrongly then do this :
declare a variable in the general declaration of Form1
VB Code:
Dim frm2 As New Form2()
Private Sub show_form2_Click(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles show_form2.Click
frm2.Show()
End Sub
Private Sub close_form2_Click(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles close_form2.Click
frm2.Close()
End Sub
dunno if you mean that ???
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
|