VB可不可以让一个窗口自己移动位置和扩大缩小啊

来源:百度知道 编辑:UC知道 时间:2024/05/03 04:39:19
我想做出一个比较夸张的效果
麻烦各位大虾帮我看看
好的话给加分,谢谢
大家可不可以解释以下代码的意思啊,谢谢啊

Private Sub Command1_Click()
Static blnBegin As Boolean

If blnBegin = False Then

Timer1.Interval = 10
Timer1.Enabled = True
blnBegin = True
Command1.Caption = "停止"

Else

Timer1.Enabled = False
blnBegin = False
Command1.Caption = "开始"

End If

End Sub

Private Sub Form_Load()

Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

End Sub

Private Sub Timer1_Timer()

Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

Me.Width = Me.Width + 10
Me.Height = Me.Height + 10

End Sub

当然可以!
Form1.Top = * '设定窗体与屏幕上方距离
Form1.Left = * '设定窗体与屏幕左方距离
Form1.Height = * '设定窗体上下大小
Form1.Width = * '设定窗体左右宽度