时钟制作 [英] Clock making

查看:64
本文介绍了时钟制作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何制作时钟

模拟和数字

有人可以帮我吗

Hi
How to make clocks
Analog and digital
Can somebody help me

推荐答案

这取决于你使用的VB版本。


在VB6中你可以放一个计时器并将间隔设置为1秒并在标签中显示时间有点类似


label1.caption =时间


查看VB帮助文件以了解如何更改格式。


在VBA中你没有定时器,所以你必须使用DoEvents和无尽的DO,比如


Do

label1.Caption =时间

DoEvents

循环


对于模拟时钟,只需创建一些行和改变它们两端的坐标(使用一些三角函数每次增加角度6°)


好​​运
It depends on which version of VB you are using.

In VB6 you can put a timer and set the interval to 1 second and show the time in a label with something like

label1.caption = time

Check the VB help file to see how to change the format.

In VBA you don''t have timers, so you''ll have to work with DoEvents and an endless DO, something like

Do
label1.Caption = Time
DoEvents
Loop

And for the analog clock just create some lines and change the coordinates of their ends (use some trigonometric functions to increase 6° the angle each time)

Good Luck



它取决于VB的哪个版本......
it depends on wich version of VB ...



谢谢,但我想用点制作的数字时钟意味着一些点会使时钟的数字不在标签中显示。

Thanks but I want the digital clock made by dots means some dots will make numbers for the clock not displaying it in label.



...对于模拟时钟,只需创建一些线条并更改其末端的坐标(使用一些三角函数每次增加角度6°)
... And for the analog clock just create some lines and change the coordinates of their ends (use some trigonometric functions to increase 6° the angle each time)



您好

您能给我一个模拟时钟的简短示例

我非常感谢你。

May上帝保佑你。

Hi
Can you give me a short example for analog clock
I''ll very thankful to you.
May God bless you.


这篇关于时钟制作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆