VB做电子报时钟(17)

时间:2025-04-05

模拟电子钟 带语音报时功能

( 2 ) play

语法形式: play 设备名称 参数

功能: 播放动画文件

说明: play 命令的参数有 [ 1 ] From position1 to position2 : 指定的开始位置播放到指定的结束位置; [ 2 ] Fullscreen : 以全屏幕的方式播放动画文件; [ 3 ] Windows : 在默认的窗口中播放动画文件.

(3) cue

语法形式: cue 设备名称 参数

功能: 准备实例供播放使用

说明: cue命令参数有 [ 1 ] output : 准备一个实例供播放使用; [ 2 ] to position : 跳到指定位置,并且处于暂停状态.

下面是修改后的源代码:

Public Type SYSTEMTIME wYear As Integer wMonth As Integer

wDayOfWeek As Integer

wDay As Integer wHour As Integer wMinute As Integer wSecond As Integer

wMilliseconds As Integer

End Type

Public Declare Sub GetLocalTime Lib " kernel32 " Alias " GetLocalTime " ( lpSystemTime As SYSTEMTIME )

Public Declare Function mciSendCommand Lib " winmm.dll " Alias " mciSendCommandA " ( ByVal wDeviceID As Long , ByVal uMessage As Long , ByVal dwParam1 As Long , ByVal dwParam2 As Any ) As Long

Public Declare Function mciSendString Lib " winmm.dll " Alias " mciSendStringA " ( ByVal lpstrCommand As String , ByVal lpstrReturnString As String , ByVal uReturnLength As Long , ByVal hwndCallback As Long ) As Long

Dim dangqianshijian AS SYSTEMTIME

‘ = = = = = = = = = = = = = = = = = = = = = = = =

‘ 每秒钟触发一次此事件,从而获取当时的时间,并调用相应的函数,画出三个针的位置 ‘ = = = = = = = = = = = = = = = = = = = = = = = = Private Sub Timer1 _ Timer ( )

VB做电子报时钟(17).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219