单选题
窗体上有一个名称为Shapel并显示为圆的形状控件(其width和Height属性值相等),一个名称为Timer1的计时器,并有下面程序代码:
Dim r As Single,flag As Integer
Private Sub Form Load()
r=Shapel.Width
Timer1.Enabled=True
Timer1.Interval=500
End Sub
Private Sub Timer1_Timer()
Ifflag=0 Then
Shapel.Width=Shapel.Width-10
IfShapel.Width<=100 Then
flag=1
End If
Else
Shapel、Width=Shapel.Width+10
If Shapel.Width>=r Then
flag=0
End If
End If
End Sub
运行程序后产生的结果是