16
Visual Basic 2008 Express Edition The IDE

Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Embed Size (px)

Citation preview

Page 1: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Visual Basic 2008 Express Edition

The IDE

Page 2: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Visual Basic 2008 Express

The Start Page

Recent Projects

Open an existing project

Create a New Project

Page 3: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Visual Basic 2008 Express

The Start Page

Getting Started Web-Based Resources

Web-Based Resources

Page 4: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Visual Basic 2008 Express

The New Project Dialog

In this course, we will always create a Windows Forms

Application

Always give the project a meaningful name.

Page 5: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Visual Basic 2008 ExpressDesign Mode

Toolbox

The Form(Window)

Project Explorer

Properties Window

Page 6: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 1

Click Create Project in the Recent

Projects Window

Page 7: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 2

Select Windows Forms Application in the New Project

dialog box.

Name the project and click OK

Page 8: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 3: Select the

Form

Set the form’s Name property

Page 9: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 3: Select the

Form

Set the form’s Text property

Page 10: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 4 – Drag and

Drop objects

onto the form.

Set the object’s properties,

starting with it’s Name property

Page 11: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Complete the Graphical User Interface (GUI) by

dropping objects onto the form and then setting

their properties.

Page 12: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

You can toggle between Form and

Code view by clicking these

icons.

Step 5: Add Code.

Double click the button to open the

code window,

showing the button’s

Click event

Page 13: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Public Class frmHello

Private Sub btnGreet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGreet.Click

lblGreeting.Text = "Hello World“

End Sub

End Class

The button’s Click event fires when the user clicks

the button.

This Visual Basic code changes the

label’s Text property to the

words Hello World

Page 14: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 6: Test your code.

Click the Play button to run your program.

Page 15: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Click the button

Note the result

Close the program

Page 16: Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project

Creating a Project

Step 7: Save your Project.

Select Save All from the File menu (or click the Save All button on the toolbar).

Note the location of your project.

VB will Create a folder named the same as your project. You will ZIP this entire folder into

one compressed file and hand in that file.