Click to See Complete Forum and Search --> : Newbie simple question
Beethoven II
May 31st, 2002, 04:34 AM
I'm a newbie in vb .net and i'm working, to learn using vb.net on a simple application.
I used to work with form but now i want to try a different way so i'd like to execute menu commands to open different forms without creating a separated form on the desktop but to put it on a free space i let in the application main form. I thought it was possible placing all controls i need and at runtime hide/show them but it comes complicated when i need to use several "forms". So i'd like to know if exist a control or a better way to do this.
Summary: How can i show forms in a predisposed free space of the main form?
Many thanks to all!!
Beethoven II
Jun 1st, 2002, 05:22 AM
I think i have not explained well what i want to do.
I'd like to know if there is a windows component that can make me display a form that i created before or on the other side have the possibility to build different layout of the main form called by main forms' menu commands.
I'll be very grateful to anyone who reply me even to say : "I understood nothing of your problem, post a draw of what you want to do!"
THANKS!!
hellswraith
Jun 1st, 2002, 01:48 PM
I understood nothing of your problem, post a draw of what you want to do
You said it... I don't quite understand what you are asking. If you can make a drawing of it, it would help me understand the question better.
abdul
Jun 2nd, 2002, 03:18 AM
You mean you want to show/hide another form(or forms) at runtime that you have already created at design time? In VB6 or lower, you could just do something like
Form2.Show
Form3.Show
and it worked. But in VB .NET you can't do this. You have to create a new instance of the form you want to show and then show it. Here is an example(showing form2):
Dim myfrm as Form2
myfrm = New Form2
myfrm.Show()
Beethoven II
Jun 3rd, 2002, 08:11 AM
Ok, it will be a little bit hard but i'll try to explain it better, i made a little animated example to better let you all understand what i mean.
In professional application whn you click on a menu command the free space on the main form comes populating with all controls you need to do what you want....
So in the first frame the user has opened a possible main form of the possible program. Then he click on the menu and then on the command, now in the free space under the menu will appear all controls he need to complete what he wants to do.
My question is how can i make my program display what usually i display by form with show method in a new form. But this time not using a new form but displaying the same contents in the free space on the main form using a command/method/properties or component i don't know.
How it's possible to do this?
abdul
Jun 3rd, 2002, 03:10 PM
So you want to create a MDI application? I have attached an example project which I copied from a VB .NET book. Hope that's what you want.
Beethoven II
Jun 3rd, 2002, 03:52 PM
I've opened it but when compiling it gives me 2 errors for each form (MDI and child):
C:\Progetti VB6\MDIProject\ChildForm.vb(17): sub 'Dispose' cannot be declared 'Overrides' because it does not override a sub in a base class.
and
C:\Progetti VB6\MDIProject\ChildForm.vb(17): sub 'Dispose' shadows an overloadable member declared in the base class 'Form'. If you want to overload the base method, this method must be declared 'Overloads'.
and the same thing for the other form......
I think it could be what i'm looking for, what are these errors??
Where can i find some helpful and possibly simple documentation about such a project type (MDI) in vb .net??
Thank you, sorry that i'm bugging you.....
Tool
Jun 11th, 2002, 05:29 PM
all you need to do is double click the error and it will show you some dispose form stuff.... just delete all the dispose stuff and it will work, i have had that problem before as well
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.