In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to develop mp3 music alarm clock in VB language. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Development of mp3 Music alarm clock
How do I play specified music?
Window media player is used to play music in VB
Can play audio in mp3, M4a and other formats
How to control music?
Need to use code control
Interface:
List of projects (there is also a music file 1.m4a):
Source code:
Option ExplicitDim startMusictime As DatePrivate Sub Command1_Click () WindowsMediaPlayer1.URL = App.Path & "\ 1.m4a" End Sub
Private Sub Command2_Click ()
If Command2.Caption = "reset" Then Option1.Enabled = True Option2.Enabled = True Option3.Enabled = True Command2.Caption = "set Music timing" Picture1.Cls Exit SubEnd If
If Option1.Value Then startMusictime = DateAdd ("s", 5 * 60, Now) Picture1.Print startMusictime & "start playing music" ElseIf Option2.Value Then startMusictime = DateAdd ("s", 10 * 60, Now) Picture1.Print startMusictime & "start playing music" ElseIf Option3.Value Then startMusictime = CDate (Text1.Text) Picture1.Print startMusictime & "start playing music" Else MsgBox "Please select a time" Exit SubEnd If
Option1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseCommand2.Caption = "reset" End Sub
Private Sub Command3_Click () If Command3.Caption = "pause" Then WindowsMediaPlayer1.Controls.pause Command3.Caption = "resume playback" ElseIf Command3.Caption = "resume playback" Then WindowsMediaPlayer1.Controls.play Command3.Caption = "pause" End IfEnd Sub
Private Sub Option3_Click () Text1.Text = NowEnd Sub
Private Sub Timer1_Timer () Label1.Caption = "now time:" & NowIf Now = startMusictime Then WindowsMediaPlayer1.URL = App.Path & "\ 1.m4a" End IfEnd Sub
The above content is how to develop mp3 music alarm clock in VB language. have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.