VB语言里面有这样一段:s = Second(Time) m = Minute(Time) + s / 60 h =
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/17 11:09:38
VB语言里面有这样一段:s = Second(Time) m = Minute(Time) + s / 60 h =
h=Hour(Time)+m/60
再问: 因为要制作一个指针时钟,您的答案我试过了,指的位置不对啊
再答: 窗体上加一个timer1,intervar设为1000(毫秒);加3个line,3个line的x1、y1相同;一个shape控件,shape属性设为3,圆心为x1,y1,把下面代码拷贝到窗体代码中,运行即可 Const pi = 3.14159 Dim len1, len2, len3 As Single Private Sub Form_Load() len1 = Sqr((Abs((Line1.Y2 - Line1.Y1))) ^ 2 + (Abs(Line1.X2 - Line1.X1)) ^ 2) len2 = Sqr((Abs((Line2.Y2 - Line2.Y1))) ^ 2 + (Abs(Line2.X2 - Line2.X1)) ^ 2) len3 = Sqr((Abs((Line3.Y2 - Line3.Y1))) ^ 2 + (Abs(Line3.X2 - Line3.X1)) ^ 2) End Sub Private Sub timer1_timer() s = Second(Time) m = Minute(Time) h = Hour(Time) + m / 60 Line1.X2 = Line1.X1 + len1 * Sin(pi * s / 30) Line1.Y2 = Line1.Y1 - len1 * Cos(pi * s / 30) Line2.X2 = Line2.X1 + len2 * Sin(pi * m / 30) Line2.Y2 = Line2.Y1 - len2 * Cos(pi * m / 30) If h >= 12 Then h = h - 12 Line3.X2 = Line3.X1 + len3 * Sin(pi * h / 6) Line3.Y2 = Line3.Y1 - len3 * Cos(pi * h / 6) End Sub
再问: 因为要制作一个指针时钟,您的答案我试过了,指的位置不对啊
再答: 窗体上加一个timer1,intervar设为1000(毫秒);加3个line,3个line的x1、y1相同;一个shape控件,shape属性设为3,圆心为x1,y1,把下面代码拷贝到窗体代码中,运行即可 Const pi = 3.14159 Dim len1, len2, len3 As Single Private Sub Form_Load() len1 = Sqr((Abs((Line1.Y2 - Line1.Y1))) ^ 2 + (Abs(Line1.X2 - Line1.X1)) ^ 2) len2 = Sqr((Abs((Line2.Y2 - Line2.Y1))) ^ 2 + (Abs(Line2.X2 - Line2.X1)) ^ 2) len3 = Sqr((Abs((Line3.Y2 - Line3.Y1))) ^ 2 + (Abs(Line3.X2 - Line3.X1)) ^ 2) End Sub Private Sub timer1_timer() s = Second(Time) m = Minute(Time) h = Hour(Time) + m / 60 Line1.X2 = Line1.X1 + len1 * Sin(pi * s / 30) Line1.Y2 = Line1.Y1 - len1 * Cos(pi * s / 30) Line2.X2 = Line2.X1 + len2 * Sin(pi * m / 30) Line2.Y2 = Line2.Y1 - len2 * Cos(pi * m / 30) If h >= 12 Then h = h - 12 Line3.X2 = Line3.X1 + len3 * Sin(pi * h / 6) Line3.Y2 = Line3.Y1 - len3 * Cos(pi * h / 6) End Sub
time up= time's up吗
It`s time to play.=It`s time for_____.
It's the second time I ___China.
有关php date函数.$time = date("Y-m-d h:i:s"); 居然输出.2011-08-20 07
minutes'=minute's吗?
in a minute's time 单数形式minute为什么要加's
初中物理的单位换算公式有哪些?像km/h=m/s这样
i'm so angry because it's the second time he __ (disturb) me
km/h=?m/s?
It's time for games.=It's time_____ _____games.
在距地面h=15m高处有一物体A以速度Va=10m/s匀速上升,与此同时在地面处有一物体B以速度Vb=30m/s竖直向上
second,minute,moment前边各用什么介词.time前边介词有多少种不同用法