Thread: Disoriented in Windows.Forms

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    Disoriented in Windows.Forms

    Hey everybody,

    Well just as I was beginning to enjoy my little fantasy world, I got my first real programming job. I need to make a program for a restaurant opening in about 9 months that functions as an employee time clock, inventory, order manager, etc...

    I'd like to lay it out as follows: A main window appears with a menu of all the selections. When the user presses a key corresponding to one of the items, the forms contents is replaced with the relevant form controls for that item, until the user is finished, at which time the window will return to it's original, Main Menu appearance. I've been doing Win32 in C for a while and I'm quite disoriented getting back into C# and it's Windowing API. How would I clear the main contents of a window (I'd like to leave the border and title bar alone) like that? Individually Hide() each elements and the new ones? I'm going through all my old source code to get back into it, but I'd really appreciate it if someone could clear this up for me.

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    53
    You could put the menus into a group box and then set the visible property to true or false.

    JMD

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Make each screen that corresponds with a menu choice it's own usercontrol. This way you can hide and show them on one command.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    Quote Originally Posted by nbo10
    You could put the menus into a group box and then set the visible property to true or false.

    JMD
    You can do this, or use a Panel.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    I just tried those both - and they both work. I'll just pick which one looks best in the finished product. Thanks guys!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Slightly Disoriented.
    By CrazyNorman in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 09-11-2005, 12:24 PM