Welcome to Bucaro TecHelp!

Bucaro TecHelp
HTTPS Encryption not required because no account numbers or
personal information is ever requested or accepted by this site

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Your First Visual Basic 2010 Express Program

Visual Basic is a Visual Programming Environment for developing Windows applications. This means that to design the application's interface you simply drag controls like buttons, text boxes, check boxes, and so on from a Toolbox, drop them on a form, reposition and resize them with the mouse, and edit their properties.

Visual Basic is an event-driven language, which means that an event, such as a user clicking on a button, triggers execution of some code. In Visual Basic's design window, when you Double-click on a control, Visual Basic creates the click event code for that control, and displays it in the code window. You add the code for what you want to happen in response to the event.

Visual Basic is very popular because it's based on the Basic programming language, which is very easy for inexperienced programmers to understand. Another reason for Visual Basic's popularity is that Visual Basic Express edition can be downloaded for free at microsoft.com⁄express⁄Downloads⁄.

When you start Visual Basic 2010 Express (VB) you'll see the Start Page. If your PC has an active Internet connection, this page can take you to useful VB information on the Web. It can also be used to open exciting projects or create new projects. In this example we'll use VB's main menu to start a new project, so just close the Start Page by clicking the x on the Start Page tab.

VB calls a program a project because a project can contain resources used by the program, such as DLL's (Dynamically Linked Libraries), icons, images, and other resources used by the main program. To start a new project, in VB's main menu select File | New Project... The New Project dialog box will appear.

New Project dialog box

The New Project dialog box is used to select the type of project you want to create. You'll see several Project Templates listed in the New Project dialog box. In this example we'll create a Windows Forms Application, so click on the Windows Forms Application icon to make sure it's selected. Near the bottom of the New Project dialog box you'll see the Name: text box. Enter a name for your project, for example: Hello World. Then click on the [OK] button.

VB displays a blank form named Form1 and since the form is initially selected, VB displays the properties of the form in the Properties window on the right side of the VB application window. If the Properties window is not visible, press the [F4] key.

When VB creates forms, controls, or other objects, it gives them default names. One of the most important things you can do in a VB project, especially a large project, is to edit these default names to something more meaningful.

Properties dialog box

One of the properties listed for the form is (Name). This is the identifier which can be used in the code to access the form. Large projects will have many forms; data entry forms, configuration forms, password forms, etc. But most every project has a Main form that functions as the program's main window. Let's rename Form1 to fmMain.

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro


Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2024 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268