[SOLVED] GUI Problem - Added Forms To Tab Control
-
Hello guys. I have a
Tab Control
in which I have placed twoForm
s. The advantage of this approach is: I designed theForm
separately and it has it's own class (unlike TabPage).TabPage
is the parent and theWindows Form
is the child control here. But I am having a small problem. When I run the application, the GUI of the the forms is little disturbed. I mean the controls were not there, where I placed them. NOTE: I also ran the application by modifying form's size w.r.t tab's size but it did not help much: like thisForm1.Height = Tab1.Height;
Form1.Width = Tab1.Width;If don't change form's original size and show it in messagebox, then this does not show original size which I set at the design time. What could I do to tackle this issue? Thanks for any pointers.
This world is going to explode due to international politics, SOON.
-
Hello guys. I have a
Tab Control
in which I have placed twoForm
s. The advantage of this approach is: I designed theForm
separately and it has it's own class (unlike TabPage).TabPage
is the parent and theWindows Form
is the child control here. But I am having a small problem. When I run the application, the GUI of the the forms is little disturbed. I mean the controls were not there, where I placed them. NOTE: I also ran the application by modifying form's size w.r.t tab's size but it did not help much: like thisForm1.Height = Tab1.Height;
Form1.Width = Tab1.Width;If don't change form's original size and show it in messagebox, then this does not show original size which I set at the design time. What could I do to tackle this issue? Thanks for any pointers.
This world is going to explode due to international politics, SOON.
First of all, you can also use a UserControl instead of placing forms in tab pages. Also have a look at the Anchor property[^]
-
First of all, you can also use a UserControl instead of placing forms in tab pages. Also have a look at the Anchor property[^]
Obaid ur Rehman wrote:
you can also use a UserControl instead of placing forms
Magar yeh meri application requirement nhi hai. Agar main aisa karta to mujhay UserControl ka code bhi apnay customer ko dena parhay ga, jo keh main nhi chahta. Waisay bhi, kitna ajeeb lagay gaa jab hum pooray ka poora inventory form design kar kay, ussay UserControl bnaa dain. I have seen people preferring my approach over the one you suggested. I think it depends mostly on application requirement.
This world is going to explode due to international politics, SOON.