Você está na página 1de 32

Interesting Education

Electro-Team Visual Basic 2010

Electroteam__@hotmail.com

IF....Then Statement
IF
condition

Then

VB expression

End IF

Conditional & Logical Operators


Operator Meaning

=
> < >= <= <> OR AND Xor Not

Equal to
More than Less Than More than and equal Less than and equal Not Equal to One side or other must be true Both sides must be true One side or other must be true but not both Negates truth

Open new project

Add above controls

F5

Edit Properties then press F5 to display output window

Steps to add new form to your project

Steps to add new form to your project

Back to Form1

Double click on button1

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

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

Close program from Stop button in IDE Toolbar

Add ListBox & PictureBox to Form2

Open project properties

Select Resources tab

We need to drag and drop image files here

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

Run Time

Selecting pic1 in ListBox will result this output

pic_one = image file name

Assignment

Images stretched to fit PictureBox dimensions

IF....Then Else Statement


IF
condition

Then

VB expression

Else
VB expression

End IF

Back To Form1

IF....Then...ElseIF Statement
IF
condition

Then

VB expression

ElseIF condition Then


VB expression

Else
VB expression

End IF

Produced by

Electro-Team

Electroteam__@hotmail.com

Você também pode gostar