![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
winforms
so I am kind of new to c#
what i am trying to do is... when a user clicks a certain button, the form should look entirely different. i am thinking the easiest way to do this would be to have two forms... the button click will close the form1 and load the form2... does that sound okay? or is there a better approach? |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
What do you mean by "the form should look entirely different."? You could change the color or size without closing the form.
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
|
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
Well yes then you want to display a new form. However if you just need to display more controls you might want to check out the TabControl
http://www.c-sharpcorner.com/UploadF...lTutorial.aspx |
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
Quote:
so yeah does my approach of new form work? (refer to my first post) |
|
|
|
|
|
|
#6 |
|
Sexy Programmer
|
I'd go just go with displaying a new form and closing out the old one. Just create two different forms and for the certain button the user presses to have the form close and display the new form.
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#7 |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5
![]() |
Another option is to have two or more panels, place controls (buttons, etc) on the panels, and set the Visible property of all but one of the panels to false. You can change which of the panels is visible, and this will give the effect of a changing form.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
so i am guessing invisible buttons lose their functionality as well, right? otherwise the option is kinda pointless
|
|
|
|
|
|
#9 |
|
Programmer
Join Date: May 2006
Posts: 51
Rep Power: 3
![]() |
i would work but as a beginner it may confuse you trying to refer to variables etc from the other form as its not just striaght forward. maybe use invisible controls and make them visible and the others invisible
__________________
AMD Athlon X2 4200+ -- Asus V3-M2V890 -- 2GB Kingston -- Vista Ultimate 32bit + Ubuntu 8.04 Intel C2D T5870 2.0GHZ -- Vostro 1510 -- 2048MB -- Windows XP SP2 ASCII stupid question, get a stupid ANSI ! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Check out my Checkers Game (C# Winforms) | OpenLoop | Show Off Your Open Source Projects | 1 | Jul 20th, 2005 12:27 PM |