Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 20th, 2007, 12:02 AM   #1
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
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?
programmingnoob is offline   Reply With Quote
Old Jun 20th, 2007, 12:29 AM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4 Wizard1988 is on a distinguished road
What do you mean by "the form should look entirely different."? You could change the color or size without closing the form.
__________________

Wizard1988 is offline   Reply With Quote
Old Jun 20th, 2007, 12:45 AM   #3
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
Quote:
Originally Posted by Wizard1988 View Post
What do you mean by "the form should look entirely different."? You could change the color or size without closing the form.
well, what i meant was....

it will have different set of buttons etc, if you know what i mean?
so it's not just appearance...
programmingnoob is offline   Reply With Quote
Old Jun 20th, 2007, 12:57 AM   #4
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4 Wizard1988 is on a distinguished road
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
__________________

Wizard1988 is offline   Reply With Quote
Old Jun 20th, 2007, 1:27 AM   #5
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
Quote:
Originally Posted by Wizard1988 View Post
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
tab wont look nice i think

so yeah does my approach of new form work? (refer to my first post)
programmingnoob is offline   Reply With Quote
Old Jun 20th, 2007, 1:30 AM   #6
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 4 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
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!
ReggaetonKing is offline   Reply With Quote
Old Jun 20th, 2007, 3:17 AM   #7
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5 lectricpharaoh will become famous soon enough
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
lectricpharaoh is offline   Reply With Quote
Old Jun 20th, 2007, 3:45 AM   #8
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
Quote:
Originally Posted by lectricpharaoh View Post
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.
so i am guessing invisible buttons lose their functionality as well, right? otherwise the option is kinda pointless
programmingnoob is offline   Reply With Quote
Old Jun 22nd, 2007, 8:53 AM   #9
teishu
Programmer
 
Join Date: May 2006
Posts: 51
Rep Power: 3 teishu is on a distinguished road
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 !
teishu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:13 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC