Before you start using Visual Studio, you should get familiar with the different parts of it.
Here is what Visual Studio will look like after you start building your game.
Just like many programs, the menu options are at the top. The ones you’ll use most often are:
- File – To open your solution, and start working on it.
- Save – Save the current file you’re working on.
- Save All – Save all changes in the current solution you’re working on.
- Build – This “compiles” your solution – converts it from C# code to code that the computer can understand. This will also tell you if there are any problems in your solution.
- Start – This builds (compiles) your program and runs it – so you can actually use it.
This section shows all the projects in your solution and all the files in the projects.
This is where you will add files to your projects, rename or move existing files, and (sometimes) delete files from your project.
- The SuperAdventure Solution – The top level grouping of your program/application.
- Engine project – Where we will put the “logic” of the program.
- SuperAdventure project – Where we will put the screen/display part of the program.
When you’re working with the parts of the game that appear on the screen – from the main form to the individual buttons and boxes on it – the Properties section will show you things you change about your currently selected object.
For instance, you can set the height and width of a form. You can set the words you want displayed on a button. You can set whether or not something is visible.
We’ll set some properties for the objects we create from this section of Visual Studio. Some others will be set from other places inside the program.
When you build, or run, your program, this is where you’ll receive status messages.
If everything is OK, you see that everything succeeded. If there were any problems, you’ll see where they are, so you can go fix them.
Just like the “Properties” section, the Toolbox area is filled when you’re currently working on the parts of your program that are displayed on the screen.
This section shows you all the things you can add to the forms in your program – buttons, labels (text), checkboxes, radio buttons, etc. You can select what you want to add to the form and drag it to the place where you want it located on your form. You might hear this called “drag-and-drop” programming.
This is the space where you actually work on a part of your program.
You select what you want to work on, from the Solution Explorer, and work on it here. You can have several files open on your workspace at one time (see the tabs at the top of the workspace), but you’ll only have one “on top”, that you’re actually working on at the moment.
Previous lesson: Lesson 00.2 – General information about programming in C#
All lessons: Learn C# by Building a Simple RPG Index