准点播报程序
适用范围:准点播放广告电影;学校、企业、工厂准点报时等等。所用软件:VB6.0 、格式工厂功能:采用windows自带的播放器,根据设置的时间,到点自动播放电影(wmv格式等windows兼容格式)、音乐(mp3格式)。非常简单,稍微有一点VB基础最多花费20分钟即可做完。程序版权暂归我所有!VERSION 5.00Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"Begin VB.Form Form1 Caption = "准点播报" ClientHeight = 5925 ClientLeft = 60 ClientTop = 450 ClientWidth = 9990 Icon = "准点报时.frx":0000 LinkTopic = "Form1" Picture = "准点报时.frx":0CCA ScaleHeight = 5925 ScaleWidth = 9990 StartUpPosition = 3 '窗口缺省 Begin VB.Timer Timer1 Interval = 100 Left = 8040 Top = 360 End Begin VB.ListBox List2 Height = 4560 ItemData = "准点报时.frx":68699 Left = 6960 List = "准点报时.frx":686A9 TabIndex = 3 Top = 1200 Width = 2655 End Begin VB.ListBox List1 Height = 4560 ItemData = "准点报时.frx":686E5 Left = 5160 List = "准点报时.frx":686F5 TabIndex = 2 Top = 1200 Width = 1815 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent BeginProperty Font Name = "宋体" Size = 14.25 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 285 Left = 2880 TabIndex = 1 Top = 360 Width = 150 End Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 Height = 4695 Left = 0 TabIndex = 0 Top = 1200 Width = 5175 URL = "" rate = 1 balance = 0 currentPosition = 0 defaultFrame = "" playCount = 1 autoStart = -1 'True currentMarker = 0 invokeURLs = -1 'True baseURL = "" volume = 50 mute = 0 'False uiMode = "full" stretchToFit = 0 'False windowlessVideo = 0 'False enabled = -1 'True enableContextMenu= -1 'True fullScreen = 0 'False SAMIStyle = "" SAMILang = "" SAMIFilename = "" captioningID = "" enableErrorDialogs= 0 'False _cx = 9128 _cy = 8281 EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub List1_Click()For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then List2.Selected(i) = True End IfNext iEnd SubPrivate Sub List1_DblClick() For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then WindowsMediaPlayer1.URL = List2.List(i) End If Next iEnd SubPrivate Sub List2_Click()For i = 0 To List2.ListCount - 1 If List2.Selected(i) = True Then List1.Selected(i) = True End IfNext iEnd SubPrivate Sub List2_DblClick()WindowsMediaPlayer1.URL = List2.List(List2.ListIndex)End SubPrivate Sub Timer1_Timer()Label1.Caption = "现在是" & Year(Now) & "年" & Month(Now) & "月" & Day(Now) & "日" & Space(1) & Hour(Now) & "点" & Minute(Now) & "分" & Second(Now) & "秒"For i = 0 To List1.ListCount - 1 If Format(Now, "hh:mm:ss") = List1.List(i) Then WindowsMediaPlayer1.URL = List2.List(i) End IfNext iEnd Sub
评论