visual programming 2 - wordpress.com

12
VISUAL PROGRAMMING 2 By: Danu Wira Pangestu bangdanu.wordpress.com

Upload: others

Post on 08-Apr-2022

4 views

Category:

Documents


1 download

TRANSCRIPT

VISUAL PROGRAMMING 2

By: Danu Wira Pangestubangdanu.wordpress.com

USING DECISION STRUCTURE

bangdanu.wordpress.com

Validate users by using If…Then

bangdanu.wordpress.com

Mask Properties

Validate users by using If…Then• Double click Button1 and type the following programs statements in

the event procedure:

If MaskedTextBox1.Text = "555-44-2222" ThenMsgBox("Welcome to the System")

ElseMsgBox("I don't recognize this number")

End If

• Run the Program

bangdanu.wordpress.com

Validate users by using If…Then

bangdanu.wordpress.com

Value if True Value if False

Using Logical Operators in Conditional Expressions

bangdanu.wordpress.com

Using Logical Operators in Conditional Expressions

bangdanu.wordpress.com

Add password protection by using the And operators

bangdanu.wordpress.com

Add password protection by using the And operators

bangdanu.wordpress.com

• Double click Button1 and modify the event procedure:

If MaskedTextBox1.Text = "555-44-2222" _

And MaskedTextBox2.Text = "54321" Then

MsgBox("Welcome to the System")

Else

MsgBox("I don't recognize this number")

End If

• Run the Program

Add password protection by using the And operators

bangdanu.wordpress.com

Short-Circuiting by Using AndAlso and OrElse

bangdanu.wordpress.com

Download Full Article at

https://bangdanu.wordpress.com