September 27th, 2012, 10:19 PM
Working multiple forms using Visual C++ 2008
Hi There, how are you?
I'm currently trying to work with more than one form, but I didn't succeed yet. What I need is quite simple: Once the program runs, a small form appears first asking "what would you like to do" with corresponding buttons for each option. Each button loads a new different form for a different task. So basically I need to open and close forms, also having two forms loaded at the same time (pop-up style) would be great for certain purposes.
Ok, one step at a time: My biggest problem is that I can't find a way to make the form RETURN a value when it closes.
My idea is that depending on what the user chooses at the first form, it returns an specific value. For example, Form 1 has button1, button2 and button3. If uses clicks button2, it closes and returns 2.
Sounds simple but I've been having a hell of a hard time trying to figure it out! Any ideas?
I know it may sound simple, but although I've searched already, I still haven't figured how to do it properly. I'm currently using VC++ 2008 and my project is a Windows Forms Application. Any help will be greatly appreciated!
Thanks a lot!
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!