19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

EXAMPLE 3<br />

The following program uses several different types of value lists. With the response shown, the first action<br />

was selected because the value of y – x is 1.<br />

Object Property Setting<br />

Private Sub cmdInterpret_Click()<br />

Dim x As Integer, y As Integer, num As Integer<br />

‘One, Two, Buckle My Shoe<br />

picPhrase.Cls<br />

x = 2<br />

y = 3<br />

num = Val(txtNumber.Text)<br />

Select Case num<br />

Case y - x, x<br />

picPhrase.Print “Buckle my shoe.”<br />

Case Is

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!