分享

课间休息实时时间显示

 wo的百家馆 2014-04-15

实际拷屏图:

实现效果:
1。鼠标移过“现在时间”图形时,显示当前实时电脑时间。
2。在宏内设置休息时间,时间到点后,提示休息时间结束。
主要宏代码:
Sub clock()
With ActivePresentation.Slides(2)
.Shapes("over").TextFrame.TextRange.Text = ""
.Shapes("clock").TextFrame.TextRange.Text = Format(time, "hh:mm:ss")
For i = 1 To 20      ‘此对应10S休息时间,如休息1分钟,相应设置为 120
t1 = Timer
While Timer - t1 < 0.5
DoEvents
Wend
.Shapes("clock").TextFrame.TextRange.Text = Format(time, "hh:mm:ss")
Next
.Shapes("clock").TextFrame.TextRange.Text = ""
.Shapes("over").TextFrame.TextRange.Text = "休息结束"
End With

End Sub

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多