'ex_p4_28select_case

Private Sub Form_Load()
10 Dim number As Integer '­Y¬O«Å§i¦¨integer¡A«h·í¿é¤J¬°«D¼Æ¦r®É¡A·|¦³¿ù»~¡C­Y­n«Å§i¦¨string¡A«h¦Ucase¤§¼Æ­È­n¥H" "¥]³ò
20 number = InputBox("1.Ãö¾÷ 2.­«·s±Ò°Ê 3.¨ú®ø")
30 Select Case number
Case 1
MsgBox "Ãö¾÷¤¤¡A½Ðµy«á¡K"
Case 2
MsgBox "­«·s±Ò°Ê¤¤¡A½Ðµy«á¡K"
Case 3
MsgBox "¨ú®ø"
Case Else
MsgBox "¿é¤J¿ù»~¡A½Ð­«·s¿é¤J"
40 End Select
End Sub


'ex_p6_13

Private Sub Form_Click() 'Click¨Æ¥ó
10 For i = 0 To 15
20 Form1.BackColor = QBColor(i) 'i=0~15§ïÅÜ­I´ºÃC¦â
30 For j = 1 To 1000000
40
50 Next j
60 Next i
End Sub

Private Sub Form_Load() 'Load¨Æ¥ó
Form1.Caption = "­I´ºÃC¦â" '¥i¦bµ{¦¡½X¤º­×§ïÄÝ©Ê
End Sub


'''ex_p6_23Labelª«¥ó_­Ë¼Æ­p®É

Private Sub Form_Load() '''Formª«¥óªºLoad¨Æ¥ó
10 Form1.Caption = "­Ë¼Æ­p®É"
20 Label1.Caption = "«ö³oùØ¡A¶}©l­Ë¼Æ30¬í"
30 Label1.Alignment = 2 '''¹ï»ô¤è¦¡
40 Label1.BorderStyle = 1 '''¥~®Ø¼Ë¦¡
50 Label2.Caption = "" '''¥¼­Ë¼Æ«eLabel2³]¬°ªÅ¦r¤¸
End Sub

Private Sub Label1_Click() '''Label1ª«¥óªºClick¨Æ¥ó
10 For i = 29 To 0 Step -1 '''­Ë¼Æ°j°é
20 Form1.Refresh '''Refresh¤èªk¡A±j¨î­«Ã¸¡A¤@©w­n¦³¡A§_«h40¦æ·|µL§@¥Î¡A¦ý41¦æ¤´¥i§@¥Î
30 Label2.FontSize = 18 '''¦rÅé¤j¤p
40 Label2.Caption = i
41 Form1.Caption = i
50 For j = 1 To 1000000 '''©µ¿ð¥Î¡AªÅ°j°é
60
70 Next j
80 Next i
End Sub