I am developing a windows application with vs2010 and I have a link label. I want to make a new card opened when clicked in my linked-label. Do I have to create a new form and add it in my main form or there is another way? If so, the second form can be placed inside my main form and how?
Thanks in advanced
Loading
George ParoglouPosted Sep 27, 2010, 4:52 AM
Cause that was the main reason I was using splitContainer
theLizardPosted Sep 26, 2010, 5:18 PM
see attached...
George ParoglouPosted Sep 26, 2010, 7:08 AM
check please the sample this is what I am trying to do...
theLizardPosted Sep 26, 2010, 6:56 AM
With good design you can have a child form with the panel you want and the link labels and show whatever it is you want to show in a separate child form which would replace the second panel of say your splitter panel.
George ParoglouPosted Sep 26, 2010, 6:13 AM
Which are the choices of making something like this? With only a splitter perhaps? I thought splitterContainer as the most appropriate way of having to separate fields: one static and the other dynamic.
Perhaps it may work without mdi way but with the third option tha koti said and what should be the syntax?
check what I mean in the attached sample. I want the splitterContainer to be maximized and form2 to be published always at the front.
theLizardPosted Sep 25, 2010, 6:32 PM
What are you using the panels for?
Why do you need panels?
George ParoglouPosted Sep 25, 2010, 3:50 AM
The problem that I am facing is that the child form is not producted at the top of panel2 but behind. I put topmost option in my child to true but still nothing!
theLizardPosted Sep 24, 2010, 11:10 PM
I certainly want lots of child forms to be opened. Is mdi method the best choice on these?
MDI is the only choice for lots of Child forms.
All child forms are owned by the MDI parent.
Unfortunately it opens the child form in a seperate window and not inside the main form and in panel2 field
It is opening the child form inside the main form as it is supposed to.
What exactly are you trying to do, what are the two panels used for, what is a card used for , is a new form just another data entry form of the same objects(Text, Combo etc)
In an MDI application each document IS an MDI Child.
Each MDI Child can be associated with another MDI Child but you need to manage these yourself.
What you are trying to do may not need an MDI solution, it may be a simple case of a single form with a dynamic Tab set.
There may be lots of options but until you can elaborate on what you want to achieve there is not much anyone can tell you.
George ParoglouPosted Sep 24, 2010, 6:37 AM
Actually I have two panels. panel1 (at left) has the menu buttons and panel2 (at right) is the place in which every new form must be published. In panel2 I want to be published my child form which has a tab control.
While waiting for an answer I developed a new form called Card1 followed the dmi option and used the code below in doubleclick event
private void linkLabel1_DoubleClick(object sender, EventArgs e)
{
Card1 sc = new Card1();
this.splitContainer1.Panel2.Controls.Add(sc.MdiParent);
sc.Show();
}
Unfortunately it opens the child form in a seperate window and not inside the main form and in panel2 field
any idea guys?
Sam HobbsPosted Sep 23, 2010, 2:53 PM
Will there be only a specific number of child windows or do you need to have many child windows? You might be able to use panels.
George ParoglouPosted Sep 23, 2010, 5:25 AM
How we manage the confusing way of having all the labels, textboxs and anything else all together in the same place of main form?
Koteswararao MallisettiPosted Sep 23, 2010, 5:18 AM
1. use the mdi forms
2.create the child form object in main form call the showDialog() method
3.create the child form object in main form call the show method
the difference between the showdialog and show is when we use show we can perform action on each form independently , when we use showDialog() we can't perform any action on parent form until child form is closed.