31
Electroteam__@hotm ail.com Interesting Education Electro-Team Visual Basic 2010

IF Then vb2010

Embed Size (px)

DESCRIPTION

Visual basic 2010 If Then Statement

Citation preview

Page 1: IF Then vb2010

[email protected]

Interesting

EducationElectro-Team

Visual Basic 2010

Page 2: IF Then vb2010

IF....Then Statement

IF  condition Then

VB expression

End IF

Page 3: IF Then vb2010

Operator Meaning

= Equal to

> More than

< Less Than

>= More than and equal

<= Less than and equal

<> Not Equal to

OR One side or other must be true

AND Both sides must be true

Xor One side or other must be true but not both

Not Negates truth

Conditional & Logical Operators

Page 4: IF Then vb2010

Open new project

Page 5: IF Then vb2010

Add above controls

Page 6: IF Then vb2010

F5

Edit Properties then press F5 to display output window

Page 7: IF Then vb2010

Steps to add new form to your project

Page 8: IF Then vb2010

Steps to add new form to your project

Page 9: IF Then vb2010

Back to Form1

Page 10: IF Then vb2010

Double click on button1

Page 11: IF Then vb2010

You can select any value for textbox.Here my value = xyz small letters.

Page 12: IF Then vb2010

Press F5 and writ your password (value) in the textbox, then press button1.

Page 13: IF Then vb2010

Close program from Stop button in IDE Toolbar

Page 14: IF Then vb2010

Add ListBox & PictureBox to Form2

Page 15: IF Then vb2010

Open project properties

Page 16: IF Then vb2010

Select Resources tab

Page 17: IF Then vb2010

We need to drag and drop image files here

Page 18: IF Then vb2010

Drag pics from local drive and drop it in VB resources window

Page 19: IF Then vb2010

Run Time

Selecting pic1 in ListBox will result this output

Page 20: IF Then vb2010

pic_one = image file name

Page 21: IF Then vb2010

Assignment

Images stretched to fit PictureBox dimensions

Page 22: IF Then vb2010

IF  condition ThenVB expression

ElseVB expression

End IF

IF....Then Else Statement

Page 23: IF Then vb2010

Back To Form1

Page 24: IF Then vb2010

IF....Then...ElseIF Statement

IF  condition ThenVB expression

ElseIF condition ThenVB expression

ElseVB expression

End IF

Page 25: IF Then vb2010
Page 26: IF Then vb2010
Page 27: IF Then vb2010
Page 28: IF Then vb2010
Page 29: IF Then vb2010
Page 30: IF Then vb2010
Page 31: IF Then vb2010

Produced by

Electro-Team

[email protected]