|
-
April 21st, 2009, 10:51 AM
#1
Close form?
Hello, all!
I have this request or a question.
I ues Microsoft Virsual Studio 2008: Exprees editon. With C++.
I created a form called Form1.
And I created another form called form2.
But when I open up form2, my Form1 is still open. How can I close that one? Or hide it?
-
April 21st, 2009, 12:41 PM
#2
Re: Close form?
This question gets asked a lot... and I always answer the same thing.
What are you trying to do ? Apart from splash screens no application in Windows behaves the way you are describing - so that does suggest that your UI design is wrong.
So post what you're trying to do and I'll see if I can't take you further...
Darwen.
-
April 22nd, 2009, 10:37 AM
#3
Re: Close form?
I'm trying to create a Windows Form Application.
I created two forms. When I built the program, I see both forms. However I should only see Form1. Untill my button is clicked, then Form1 should be hided and form2 should show up.
-
April 22nd, 2009, 12:04 PM
#4
Re: Close form?
 Originally Posted by realchamp
I'm trying to create a Windows Form Application.
I created two forms. When I built the program, I see both forms. However I should only see Form1. Untill my button is clicked, then Form1 should be hided and form2 should show up.
I don't think you get what darwin means. He doesn't understand why you want that behaviour from your application. What is the point of this setup? Shouldn't you just be hiding and unhiding controls on 1 form instead?
-
April 23rd, 2009, 07:59 AM
#5
Re: Close form?
Last edited by realchamp; April 5th, 2012 at 11:53 AM.
-
April 23rd, 2009, 02:02 PM
#6
Re: Close form?
You want a wizard.
(1) Do your UI work in C# and not C++/CLI. Forms in C++/CLI is painful.
(2) See here for a wizard component.
Darwen.
-
April 23rd, 2009, 02:26 PM
#7
Re: Close form?
Yeah I've been told to use C#.
But I don't want to teach C# now when I just learned C++.
Or do you have a free online guide for C#?
I'd like to have that one!
And thanks!
-
April 23rd, 2009, 02:43 PM
#8
Re: Close form?
Learning C++/CLI does not teach you C++. Do you know what an std::vector is ?
If you want to learn .NET, then switch to using C#.
Darwen.
-
April 23rd, 2009, 02:57 PM
#9
Re: Close form?
Syntax wise c# isn't that different from c++. I find c# to be very intuitive as an OOP programmer. Picked up on c# quite easily.
-
April 24th, 2009, 03:48 AM
#10
Re: Close form?
I know C# almost has the same syntax. However the commands are different.
Well I will have a look at C#!
Thanks guys!
-
April 29th, 2009, 09:42 AM
#11
Re: Close form?
@Darwen:
(a diversion, please forgive me)
C++ seems fine to me. The beauty of .NET ( in my super-limited experience ) is that it doesn't seem to matter what language I'm using. Can you explain why C# is so much better for people working with .NET / forms?
Not a crit, by the way, I really want to know if I should be switching to C#.
-
April 29th, 2009, 04:21 PM
#12
Re: Close form?
C++ seems fine to me. The beauty of .NET ( in my super-limited experience ) is that it doesn't seem to matter what language I'm using.
Absolutely. Which is why I use C#. Just from a language point of view I find it much quicker to develop in than C++/CLI.
1. Intellisense works !
2. No need to seperate out .h and .cpp. No need to write method definitions twice (and make sure they match up grrr).
3. Having '.' as a namespace separator : easier to type than 2 colons.
4. No #includes... oh the joy !
5. Lots and lots more...
Can you explain why C# is so much better for people working with .NET / forms?
Compare the code generated by the designer in C# (quite nice) to the code generated by the designer in C++/CLI (not nice at all).
Also it's very easy to break the designer in C++/CLI. It's still possible to break the designer in C#, but it's a lot more stable from my experience.
Of course, these are just my own opinions.
Darwen.
Last edited by darwen; April 29th, 2009 at 04:23 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|