My question is, how do I add a button with such properties so that when I click it the window that is open changes?
To simplify my meaning; I have a "Create an account button" when I click the button I want the window to change totally into another window where you can choose your name and password. I do not want a new window to be created.
What I don't want to happen is that when you press a button a new window pops up. (An example would be that if you press a button on youtube a new window pops up, that wouldn't be so nice, because if you press on 10different videos 10 windows would pop up, I don't want that to happen)
The thing is that I got an task to make a vocabulary trainer, so I have made the first window, with two buttons, one says "Create an account" The other says "Login". What I want is that when I press the button "Create an account" a new window replaces the old window and then you can choose your name and password. But a new window should not be opened, it need to be the same window, so there is only 1 window opened the whole time.
I am not a user of Microsoft Visual C++, but expect that it works pretty much the same as what I use. There should be an attribute named Visible or something close to that on the buttons, edit boxes, etc. that you wish to use on your form (window). You can design the layout for each of the input 'boxes' that you want to create, and turn the Visible attribute on and off as required for the different stages of your program.
If this is for an assignment, I understand the logic behind using the same window. If it is for what you hope to be using as an actual application, I would suggest that you use separate windows (popups) for your login etc. If you do this, you only have to activate the windows that you want visible when you want them visible which is more efficient for you as the programmer, and more importantly for your application and users.
Is somebody familiar with using windows form in visual studio 2012? Because there is no video, no guide or help out there, and the book I got is just pure crap. Because the coding doesn't work exactly the same way as C++ I am guessing?
Life would be very much simple for you if you create another form... With its own window, and make it a modal dialogue box to ask the user for name and password. Your "create" button could then just call the dialogue to get the info. I'm not at my PC at the moment and I'm not yet familiar enough with VS to tell you what buttons to press to add a new form , but it will give you a new cpp and h file to your project.
Playing around with toggling visibility on controls is trickier...
Well, should I use another program? Because there is no help out on the web for windows form with visual studio 2012, doesn't work the same way as the older ones, already tried. However the programming language needs to be C++ because that's the subject that I have picked in school. So do you guys have any suggestion where you can program with C++ and it needs to be graphic, I don't want to make the programs with a cmd window. And what about the QT and other stuff that were listed earlier in the thread, what are they?
I don't know windows forms so I don't know if there is a way to do what you are wanting. If you were using Java, the simple solution would be to use a card layout. That basically does what has already been suggested and opens a new window were the old one was.
QT is a popular GUI library that should have something similar, but you would be better off using the IDE that comes with it than trying to integrate the library into Visual Studio. wxWidgets is another popular GUI library that plays well with Visual Studio and most other IDEs as far as I know.
It might be easier (or harder?) to think of everything in a GUI as a window including buttons. Layout managers take care of most of the drudgery of positioning, sizing, and other management tasks for all the "widows" in your GUI. Every library is going to do all that differently and how well any of it fits your needs depends on what you are trying to do overall.
Duoas' suggestion sounds like it will do what you want with what you are working with though.