VB要求设计一个数字时钟界面,我已经设计了一部分,不明白为什么完全不动,对计时器很不在行啊,求速答
VB编辑计时器显示当前时间的数字时钟(包括时:分:秒)代码 Private Sub Form_Load()Timer1.Enabled=True Timer1.Interval=1000 Label1.Caption=Time$'在Form_Load就要加上,否则你要等1秒后Label才会开始跑 End Sub Private Sub 。
怎么样用vb写一个简单的数字式时钟,不要指针式的。。要自己输入时间,点击button就顺着这时间走的??
vb 时钟代码 修改并测试成功!Private Sub Form_Load()Form1.AutoRedraw=TrueForm1.Height=8000Form1.Width=8000Form1.Scale(-100,-100)-(100,100)Line1.X1=0:Line1.Y1=0Line2.X2=0:Line2.Y1=0‘.>;>;>;Line2.X1=0:Line2.Y1=0Line3.X1=0:Line3.Y1=0Line1.BorderColor=RGB(0,0,0)Line1.BorderWidth=3Line2.BorderColor=RGB(0,0,255)Line2.BorderWidth=2Line3.BorderColor=RGB(255,0,0)Line3.BorderWidth=1Shape1.Top=-95Shape1.Left=-95Shape1.Width=190Shape1.Height=190Shape1.BorderStyle=3Shape1.BorderWidth=3Shape1.BorderColor=RGB(0,0,255)Timer1.Interval=1000End SubPrivate Sub Timer1_Timer()sx=Sin((180-6*Second(Time))*3.14159/180)*65sy=Cos((180-6*Second(Time))*3.14159/180)*65Line3.X2=sxLine3.Y2=symx=Sin((180-6*Minute(Time))*3.14159/180)*65my=Cos((180-6*Minute(Time))*3.14159/180)*65Line2.X2=mxLine2.Y2=myhx=Sin((180-(30*Hour(Time)+30*Minute(Time)/60))*3.14159/180)*40hy=Cos((180-(30*Hour(Time)+30*Minute(Time)/60))*3.14159/180)*40Line1.X2=hxLine1.Y2=hyForm1.CurrentX=-2Form1.CurrentY=80Form1。.
VB数字时钟的制作 添加一个label控件命名为label添加一个timer控件命名为timer1设置timer1的Interval属性为1000添加一下代码Dim Hour As Integer '小时Dim Min As Integer '分钟Dim Sec As Integer '秒Private Sub Form_Load()Hour=0Min=0Sec=0Label1.Caption=\"00:00:00End SubPrivate Sub Timer1_Timer()Dim strHour As StringDim strMin As StringDim strSec As StringSec=Sec+1If Sec>;=60 ThenSec=0Min=Min+1If Min>;=60 ThenMin=0Hour=Hour+1If Hour>;=24 ThenHour=0End IfEnd IfEnd IfIf HourstrHour=\"0\"&HourElsestrHour=HourEnd IfIf MinstrMin=\"0\"&MinElsestrMin=MinEnd IfIf SecstrSec=\"0\"&SecElsestrSec=SecEnd IfLabel1.Caption=strHour&\":\"&strMin&\":\"&strSecEnd Sub
vb中设置一个数字时钟界面,每改变一秒就更新一次,求程序。 Private Sub Form_Load()Me.Caption=\"数字时知钟Timer1.Interval=1000Timer1.Enabled=TrueEnd SubPrivate Sub Timer1_Timer()Label1.Caption=Format(Now,\"yyyy年道m月d日内\")Label2.Caption=Format(Now,\"hh时nn分ss秒容\")End Sub
怎么使用VB来编写一个时钟? 最简单的时钟:在窗体处添加一个picturebox,一个计时器Private Sub Timer1_Timer()Picture1.ClsPicture1.Print\"\"&timeend sub