I have an Mdiform which with help of menustrip opens Form1.
From this form(Form1) I open another form i.e Form2.which I want also to be a part of my mdiform
I created property of mdiform and mapped it in my form2 when it loads.but still it does not become a part of mdiform.
Another problem is ,it keeps generating new instances of form2 whenever I again click button in form1,which is child of my mdiform.I want that only single instance of form2 should be visible.
I tried doing different ways but still generates new instances.
Can anyone explain this?
Thanks in advance
srm2010
-1
Newbie Poster
Recommended Answers
Jump to PostSee if this helps to load Form2 from Form1, into the MDI Form.
Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click With Form2 .MdiParent = myCoolMDIform '// set the MDI Parent for the Form. .Show() '// Load the Form. End With End …
Jump to Post>>Form3 f3=new Form3();
That looks entirely like C#.code and will "ALWAYS" give you an error in VB.NET.AndAlso, as soon as you declare as "New Form3", you will "ALWAYS" load a new.instance of a Form.
All 7 Replies
codeorder
197
Nearly a Posting Virtuoso
srm2010
-1
Newbie Poster
codeorder
197
Nearly a Posting Virtuoso
Pgmer
50
Master Poster
Featured Poster
Pgmer
50
Master Poster
Featured Poster
srm2010
-1
Newbie Poster
Pgmer
50
Master Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.