Intro to visual studio 2008

12
1 Introduction to Programming VB.NET & Visual Studio 2008

Transcript of Intro to visual studio 2008

Page 1: Intro to visual studio 2008

1

Introduction to Programming

VB.NET

&

Visual Studio 2008

Page 2: Intro to visual studio 2008

22

Questions

What is Computer Programming?

What are Programming Languages?

What are Programming Tools?

Page 3: Intro to visual studio 2008

33

We will use

VB.Net

Microsoft Visual Studio 2008

Page 4: Intro to visual studio 2008

44

Getting Started

File, New Project

OR Create New

Project

Page 5: Intro to visual studio 2008

55

Create New Application

Find a place to save your project (USB pen or desktop if H:drive not shown)

Select Windows Forms Application

Give project a descriptive name

Make sure this is ticked

Page 6: Intro to visual studio 2008

66

Visual Studio Workspace

Page 7: Intro to visual studio 2008

77

The Bouncing Picturebox

Download the Images.zip file and unzip to your program folder

Carefully follow the instructions on: The Bouncing Picturebox Worksheet

Read each line of code and make sure you know what it does

Attempt the extra tasks at the end of the worksheet

Page 8: Intro to visual studio 2008

88

Programming Concepts

A Timer – repeatedly executes code at intervals

A (Sub) Procedure– is a set of code statements

Page 9: Intro to visual studio 2008

99

Concepts

Variables – to store valuesDim variable As datatype

Conditional StatementsIf ... Then

Page 10: Intro to visual studio 2008

1010

Form Co-ordinates

Just like a graph in maths, the VB.NET form uses the X and Y ‘co-ordinates’ system so we can say where we want to place an object

The unit used is the pixel

Location = 50, 100

Page 11: Intro to visual studio 2008

1111

Form Co-ordinates

Unlike a maths graph, the point 0,0 is at the top left.

The form size has been set to 600 wide and 500 deep

0,0 600,0

600,500

X = 600

Y = 500

Page 12: Intro to visual studio 2008

1212

Developing the Game:

Ideas?

Investigate:Adding a Score

Adding a time limit