Results 1 to 8 of 8

Thread: Newbie simple question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    8

    Exclamation Newbie simple question

    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!!

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    8
    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!!

  3. #3
    hellswraith
    Guest
    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.

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    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):
    VB Code:
    1. Dim myfrm as Form2
    2. myfrm = New Form2
    3. myfrm.Show()
    Baaaaaaaaah

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    8

    Talking Better explication

    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?
    Attached Files Attached Files

  6. #6
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    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.
    Attached Files Attached Files
    Baaaaaaaaah

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    8

    Unhappy ..........

    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.....

  8. #8
    Hyperactive Member
    Join Date
    Jun 2002
    Location
    midewest u.s.
    Posts
    275
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width