手机版

VB做电子报时钟(17)

发布时间:2021-06-06   来源:未知    
字号:

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

( 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文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)