有谁能帮我把这两个程序连在一起吗?急用!
第一个:Private Sub Command1_Click()
GotoVal = Me.Height / 2
For Gointo = 1 To GotoVal
'NEW ADDITION NEXT LINE
DoEvents
Me.Height = Me.Height - 10
'Me.Top = (Screen.Height - Me.Height) \ 2
If Me.Height <= 11 Then GoTo horiz
Next Gointo
'This is the width part of the same sequence above
horiz:
Me.Height = 30
GotoVal = Me.Width / 2
For Gointo = 1 To GotoVal
'NEW ADDITION NEXT LINE
DoEvents
Me.Width = Me.Width - 10
'Me.Left = (Screen.Width - Me.Width) \ 2
If Me.Width <= 11 Then End
Next Gointo
End
End Sub
第二个:Option Explicit
DefDbl A-Z
Private Sub Form_Load()
timer1.Interval = 100
Width = 4000
Height = 4000
Left = Screen.Width \ 2 - 2000
Top = (Screen.Height - Height) \ 2
End Sub
Private Sub Form_Resize()
Dim i, Angle
Static flag As Boolean
If flag = False Then
flag = True
For i = 0 To 14
’画出表盘12个点和时、分、秒共15个LINE
If i > 0 Then Load Line1(i)
Line1(i).Visible = True
Line1(i).BorderWidth = 5
Line1(i).BorderColor = RGB(0, 128, 0) ’设置LINE的粗细和颜色
Next i
End If
For i = 0 To 14
Scale (-1, 1)-(1, -1)
Angle = i * 2 * Atn(1) / 3
Line1(i).X1 = 0.9 * Cos(Angle)
Line1(i).Y1 = 0.9 * Sin(Angle)
Line1(i).X2 = Cos(Angle)
Line1(i).Y2 = Sin(Angle)
Next i
End Sub
Private Sub timer1_Timer()
Const HH = 0
Const MH = 13
Const SH = 14
Dim Angle
Static LS
If Second(Now) = LS Then Exit Sub
LS = Second(Now)
Angle = 0.5236 * (15 - (Hour(Now) + Minute(Now) / 60))’设置时针
Line1(HH).X1 = 0
Line1(HH).Y1 = 0
Line1(HH).X2 = 0.3 * Cos(Angle)
Line1(HH).Y2 = 0.3 * Sin(Angle)
Angle = 0.1047 * (75 - (Minute(Now) + Second(Now) / 60))’设置分针
Line1(MH).X1 = 0
Line1(MH).Y1 = 0
Line1(MH).X2 = 0.7 * Cos(Angle)
Line1(MH).Y2 = 0.7 * Sin(Angle)
Angle = 0.5236 * (75 - Second(Now))
’设置秒针
Line1(SH).X1 = 0
Line1(SH).Y1 = 0
Line1(SH).X2 = 0.8 * Cos(Angle)
Line1(SH).Y2 = 0.8 * Sin(Angle)
form1.Caption = Str(Now())
'窗口显示精确的日期和数字化的时间
End Sub