Programming | | Notes on Introduction to the VB Program: |
MSDN AA in Review: By enrolling in this course you will be part of MSDN Academic Alliance for High School. MSDN Academic Alliance allows you to have full .NET framework at your home PC. At a given point (optional of course) you will be allowed to take home the Visual Studio .Net framework CD’s to be installed on your home personal PC. Mr. Proctor will conduct a sign-out/sign-in check out process. We will need to take turns with this system. Your home personal PC will need to have Windows XP installed on your machine. This opens the door if at any time you need to complete work at home or as needed. Review the system requirements at http://msdn.microsoft.com/vstudio/products/sysreqs/default.aspx. Checking out the class CD’s and installing the Visual Studio .Net software on your home computer, will give you the opportunity to work at home.
Visual Basic .NET: As the people at Microsoft say “Unleash the Power of the .NET!” If we want to take the Internet to the next level we clearly need a solid infrastructure for exchanging data and performing distributed transactions. This .Net framework will be the tool that you will use. In addition to the course web site, this course will use a classroom textbook “Visual Basic 2008” to help teach you programming concepts. This Visual Basic .NET environment is always get updates and is changing, but as you will see it has many new and different features. Follow the steps below in getting started with this IDE.
We will start programming without an interface of a form, through the use of the Console Application. Then the class will move onto more event driven programming. The following steps will guide you through in getting Visual Basic started throught programming with the Console Application.
8. Please select the Console Application (in the Templates list). Note programming with the console application does not include forms or other user interface elements.
9. Key in the file name Hello World (in the Name box) and select your location using the browser button.
10. Verify your file name and location (A: drive) and then click OK. At this point you are ready to start entering and coding your programs.
11. Visual Studio will now create a file called "Hello World.vb" that should look as follows:
Structure of a Visual Basic Program: A Visual Basic program has standard building blocks. Visual Basic code is stored in project modules. Projects are composed of files, which are compiled into applications. When you start a project and open the code editor, you see some code already in place which will be the default procedures put into place (AS SHOWN ABOVE). Any code that you write will be applied within the Module.
1. Click the Start button.
2. Select All Programs.
3. Select the Microsoft Visual Studio menu option.
4. Select Microsoft Visual Studio on the submenu to start the application.
5. When the application opens you will see a Start page similar to the below figure. This Start page will have many options. You will also have a Solution Explorer, Properties Window, and a Toolbox. None of the windows and controls are active until you either load-up or start a new project. Visual Studio sports a new and improved Start Page that enables users to create new projects, find online resources, and configure their Visual Studio profile. Moreover, the Start Page provides quick links to options for asking questions, sending feedback, and searching for samples and controls across the Web.
6. Once Visual Studio .NET is opened on the Start page, you will see many things on the start page. To start or open a new project, can be done many ways. The image to the right will highlight and show ways to open a new project. You will find that there is more than one way to complete tasks. I find when trying to open projects may be just as easy to open My Computer and launch and open the project from your own files.
7. This will bring up a New project dialog window which you will see a Project Type windows and a Template windows. Please be aware that when you take steps to open a new project in .NET it will force you to save the application before you can do anything. The image that you see below is what the “New Project” dialog window will look like. You will take steps to give the file a name and a location for this new project. When saving, you will see that .NET will place a folder (with the file name) and will have many files inside this folder. The actual programs will be placed inside this folder. By selecting the check box on this window this will make sure your project is placed in a folder.
Try to save all work to the A: drive onto your classroom computer disk.
This program execution starts at Main subroutine and uses th System to write to the console window System. The Console module contains a WriteLine subroutine. This WriteLine subroutine outputs given value to the screen. "Hello, you are now on your way to Programming" is what will be outputed to the screen.
Teacher's Comments: You will be guided to learn and use the IDE together through this unit and future units. You will be taught and forced to learn this new environment and Visual Basic 2008 as the programming languages. You must review these structures while moving forward with new programming design concepts.