因為 Form_Load 還沒跑完前
表單窗體 是 不會顯示出來的
此時如果不將 Form1 的 AutoRedraw 設為 True
print(畫在) 在 Form1 的 咚咚
就會因為 "重新顯示" 這個動作在後
使的在Form1畫布上的圖形
消失掉 (不被自動重繪)
可以比較一下
語法:
Private Sub Form_Load()
Dim WeeK As String
Me.AutoRedraw = True
WeeK = InputBox("請輸入一星期7天的英文單字:")
Select Case LCase(WeeK)
Case "sunday": Print "Sunday 是星期日"
Case "monday": Print "Monday 是星期一"
Case "tuesday": Print "Tuesday 是星期二"
Case "wednesday": Print "Wednesday 是星期三"
Case "thursday": Print "Thursday 是星期四"
Case "friday": Print "Friday 是星期五"
Case "saturday": Print "Saturday 是星期六"
End Select
End Sub
與
語法:
Private Sub Form_Load()
Dim WeeK As String
WeeK = InputBox("請輸入一星期7天的英文單字:")
Select Case LCase(WeeK)
Case "sunday": Print "Sunday 是星期日"
Case "monday": Print "Monday 是星期一"
Case "tuesday": Print "Tuesday 是星期二"
Case "wednesday": Print "Wednesday 是星期三"
Case "thursday": Print "Thursday 是星期四"
Case "friday": Print "Friday 是星期五"
Case "saturday": Print "Saturday 是星期六"
End Select
Me.AutoRedraw = True
End Sub
有何不同