vb.net制作闹钟 用vb制作闹钟

跪求用vb.net做一个小闹钟!!

'加个定时器,textbox ,button,label Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

10多年的富阳网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。营销型网站的优势是能够根据用户设备显示端的尺寸不同,自动调整富阳建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联建站从事“富阳网站设计”,“富阳网站推广”以来,每个客户项目都认真落实执行。

Label1.Text = Now

If FF = Now And FF "2001-1-1" And Timer1.Tag = "" Then

Timer1.Tag = "1"

MsgBox("ff")

End If

End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

FF = TextBox1.Text

Timer1.Tag = ""

End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

FF = "2001-1-1"

End Sub'声音加个 AxMMControl控件 AxMMControl1.DeviceType = "waveaudio" ''''''''定义播放*.wav格式 AxMMControl1.FileName = "c:\1.wav" ''''''''载入文件, AxMMControl1.Command = "open" ''''''''打开载入的文件

AxMMControl1.From = 0 '从头开始

AxMMControl1.Command = "play"'保存时间,只要设定时把时间保存到文本文件就行,load 事件中读取,并对比是不是超时,.

怎样用vb.net作一个指针转动的钟表?(可设置时间日期,有闹铃功能)

你需要会用GDI+,也就是那个System.Drawing命名空间下的类.

给你说个思路,设Timer,到时间就用Form.Invalidate()函数重画窗口,在重画窗口的Form_Paint事件下面编写代码得到当前时间,再根据当前时间用GDI+画时钟.

利用vb.net实现小闹钟功能

Private Declare Function mciSendStringA Lib "winmm.dll" _

(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _

ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer

Function PlayMidiFile(ByVal MusicFile As String) As Boolean

If System.IO.File.Exists(MusicFile) Then

mciSendStringA("stop music", "", 0, 0)

mciSendStringA("close music", "", 0, 0)

mciSendStringA("open " MusicFile " alias music", "", 0, 0)

PlayMidiFile = mciSendStringA("play music", "", 0, 0) = 0

End If

End Function

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

If TextBox1.Text = TimeOfDay Then

'具体提醒的东西,如你说的播放音乐

PlayMidiFile("自己添加路径")

End If

'时间格式要是这样的16:00:00

'timer的interval要设成1

'你还可以自己细化

End Sub


分享名称:vb.net制作闹钟 用vb制作闹钟
链接分享:http://pwwzsj.com/article/dossddg.html