| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 416 人关注过本帖
标题:[求助]
只看楼主 加入收藏
sender
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-12-21
收藏
 问题点数:0 回复次数:2 
[求助]

有谁能帮我把这两个程序连在一起吗?急用!
第一个: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

搜索更多相关主题的帖子: sequence 
2005-12-21 21:13
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
拷贝都不会?

拷贝都不会?



HbI8STSL.rar (5.56 KB) [求助]



天津网站建设 http://www./
2005-12-22 08:38
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 

DefDbl A-Z

Private Sub Command1_Click()
Timer1.Enabled = False
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

Unload Me
End Sub


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()
On Error Resume Next
Dim i, Angle
Static flag As Boolean
If Timer1.Enabled = False Then Exit Sub
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


天津网站建设 http://www./
2005-12-22 08:40
快速回复:[求助]
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016913 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved