Introduction / The Visual Basic 2005 Environment
Subtitles of the Movie
In this movie I will begin discussing the basic steps for writing a Visual Basic project. We will explore the files and make up a Visual Basic project and discuss items such as design time, run time and debug time. We will briefly discuss error types and finally we will see how to launch Visual Basic 2005. When designing a Visual Basic project, there is a three-step process that you will follow. You first must design the user interface, which is the form, including any controls that are needed for the user to interact with. Once the controls are established, we will then set up properties for those controls, such as the name property. Once the form is designed and properties are in place, then we can begin to focus on the code. When we're writing code, we need to be careful to follow the language's syntax rules. Syntax refers to the rules that must be followed, such as punctuation, spelling, the use of special symbols and keywords. You will soon discover that when you create a Visual Basic application, that there are many, many files that make up one simple VB application. There are multiple files in multiple folders. The one file that you will want to interact with is referred to as the solution file. This will have the extension of .sln. You will want to avoid opening any other files that's automatically created for each solution. You only want to focus on the solution file. The other file that you might want to work with later on is the executable file. This will have the extension of .exe. This is the file that the end user will ultimately run. But in the design process, you will only work with the solution file. There are various modes of Visual Basic: design time, run time and break time. When you are in design time, you are designing the program. That is either the user interface or you're writing code. You are not actually running the program, you are simply designing the program. Run time simulates what the user will see when the project is running. You will be going between these two modes often; that is design time and run time. A third mode is break time. This is when an error occurs or some other condition that requires your attention. It's important to note that when it says break at the top of the screen, you are in break time and you must correct this issue before you can continue in either design time or run time. We will see examples of this soon. A few more items of terminology: each user action causes an event to occur. The most common action is the mouse click. You will create a form with controls and you will want the user to click on these controls. When the user does click on a control, this is referred to as an event procedure. The event procedure is code that you will write to react to those events if you so desire. Visual Basic will ignore any events for which you do not write code. You will also want to get in the habit of writing remarks or comments in your program. This is for documentation only and is considered non-executable. That is, it does not actually cause any action to occur but it is an important programming concept. You will immediately notice that these will appear green in color. You create a comment by beginning the statement with an apostrophe, which will also be in green. Good user remark statements will make complex programs easy to understand. You should get in the habits of writing comments or remarks very early in the programming process. Some naming rules that you want to be aware of: when you're naming objects, you will want to begin with letters, no spaces, avoid special symbols, although the underscore is OK to use and you will want to use what's called camel casing. You see on the screen some examples of camel casing: messageLabel, all one word, no spaces and came casing is the use of uppercase letters only for the first letter of each word after the first word. So you'll want to begin with lowercase and then only use the uppercase letter for each word after the first word. Notice that last example uses the underscore and this is acceptable. Now we're ready to launch Visual Basic 2005. You simply click Start, then click All Programs, look for Microsoft Visual Studio 2005 item and then the same item once again, Microsoft Visual Studio 2005. This will launch Visual Studio and we will now be able to work with Visual Basic 2005 within Visual Studio.
Tutorial Information
| Course: | Microsoft Visual Basic 2005 |
| Author: | Arthur Lee |
| SKU: | 33940 |
| ISBN: | 1-935320-10-6 |
| Release Date: | 2008-11-19 |
| Duration: | 7.5 hrs / 97 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 81,350 Video Tutorials (20,800 free)
- Video Available as Flash or QuickTime
- Over 782 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 