高手请教,怎样修改下面程序才能使程序按照设定的时间闹钟?谢谢。
PrivateSubCommand1_Click()WindowsMediaPlayer1.Enabled=FalseEndSubPrivateSubForm_Load(...
Private Sub Command1_Click()
WindowsMediaPlayer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
WindowsMediaPlayer1.Enabled = False
WindowsMediaPlayer1.URL = "E:\360data\重要数据\我的文档\My Music\01[1].wma" '填入路径名如"D:\music\NewStories.mp3"
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Label1.Caption = "3:05:00" Then '设置闹钟时间
WindowsMediaPlayer1.Enabled = True
End If
End Sub 展开
WindowsMediaPlayer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
WindowsMediaPlayer1.Enabled = False
WindowsMediaPlayer1.URL = "E:\360data\重要数据\我的文档\My Music\01[1].wma" '填入路径名如"D:\music\NewStories.mp3"
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Label1.Caption = "3:05:00" Then '设置闹钟时间
WindowsMediaPlayer1.Enabled = True
End If
End Sub 展开
展开全部
我想思想应该是这样的:最初MMC控件是不可用的,然后当系统时间到了某一时刻时(计时器检测,这地方不能拿标签和时间格式的比较吧?),MMC控件开始启动并自动播放影音(autoplay)。你上面的结构都是错的,改改!
希望可以帮到你!
希望可以帮到你!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
WindowsMediaPlayer1.URL = ""
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Label1.Caption = "17:40:00" Then '设置闹钟时间
WindowsMediaPlayer1.URL = "d:\1.mp3"
End If
End Sub
整点闹钟
Private Sub Command1_Click()
WindowsMediaPlayer1.URL = ""
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Minute(Time) = Val("00") And Second(Time) = Val("00") Then '设置闹钟时间
WindowsMediaPlayer1.URL = "d:\1.mp3"
End If
End Sub
WindowsMediaPlayer1.URL = ""
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Label1.Caption = "17:40:00" Then '设置闹钟时间
WindowsMediaPlayer1.URL = "d:\1.mp3"
End If
End Sub
整点闹钟
Private Sub Command1_Click()
WindowsMediaPlayer1.URL = ""
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Time
WindowsMediaPlayer1.Visible = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
If Minute(Time) = Val("00") And Second(Time) = Val("00") Then '设置闹钟时间
WindowsMediaPlayer1.URL = "d:\1.mp3"
End If
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看不懂。为啥找我呢。我本科包装。谢谢
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询