📄 frmwakeup.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmWakeUp
BorderStyle = 1 'Fixed Single
Caption = "Wake Me Up v1.0 Beta1"
ClientHeight = 3690
ClientLeft = 5805
ClientTop = 2190
ClientWidth = 6105
Icon = "frmWakeUp.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3690
ScaleWidth = 6105
Begin VB.CommandButton cmdReset
Caption = "Reset Alarm"
Height = 270
Left = 2385
TabIndex = 14
Top = 2490
Width = 1380
End
Begin VB.CheckBox chkWhenStopedPlayAgainAfter5min
BackColor = &H80000010&
Caption = "Play every 5min."
ForeColor = &H8000000E&
Height = 240
Left = 2400
TabIndex = 13
Top = 2145
Width = 2070
End
Begin VB.CheckBox chkAfter5Min
BackColor = &H80000010&
Caption = "Stop after 5min."
ForeColor = &H8000000E&
Height = 240
Left = 645
TabIndex = 12
Top = 2145
Width = 1545
End
Begin VB.CheckBox chkDontStop
BackColor = &H8000000C&
Caption = "Don't Stop"
ForeColor = &H8000000E&
Height = 255
Left = 630
TabIndex = 11
Top = 2490
Width = 1815
End
Begin VB.TextBox txtStatus
Height = 720
Left = 165
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 2820
Width = 5790
End
Begin VB.CommandButton cmdSelectSong
Caption = "Select Song"
Height = 330
Left = 630
TabIndex = 9
Top = 1395
Width = 1440
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5505
Top = 75
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Timer tmrTime
Enabled = 0 'False
Interval = 1000
Left = 4455
Top = 105
End
Begin VB.ComboBox cboDayTime
Height = 315
Left = 3720
TabIndex = 7
Top = 615
Width = 675
End
Begin VB.ComboBox cboMinute
Height = 315
Left = 2865
TabIndex = 6
Top = 615
Width = 675
End
Begin VB.ComboBox cboHour
Height = 315
Left = 2295
TabIndex = 5
Top = 615
Width = 615
End
Begin VB.Line Line1
BorderColor = &H80000005&
X1 = 285
X2 = 5325
Y1 = 555
Y2 = 555
End
Begin VB.Label lblWakeUpSongPTH
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 690
Left = 2295
TabIndex = 8
Top = 1020
Width = 3600
End
Begin VB.Label lblCurrentTimeD
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "0:00:00"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 2355
TabIndex = 4
Top = 270
Width = 1755
End
Begin VB.Label lblWakeUpSong
BackStyle = 0 'Transparent
Caption = "Wake Up Song:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 660
TabIndex = 3
Top = 1005
Width = 1755
End
Begin VB.Label lblWakeUpTime
BackStyle = 0 'Transparent
Caption = "Wake Up Time:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 675
TabIndex = 2
Top = 630
Width = 1755
End
Begin VB.Label lblCurrentTime
BackStyle = 0 'Transparent
Caption = "Current Time:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 900
TabIndex = 1
Top = 270
Width = 1755
End
Begin VB.Label lblBG
BackColor = &H8000000C&
Height = 3570
Left = 75
TabIndex = 0
Top = 60
Width = 5970
End
Begin VB.Menu mnuTools
Caption = "&Tools"
Begin VB.Menu mnuSetWakeUpTime
Caption = "Set Wake Up Time"
End
Begin VB.Menu mnuSetWakeUpSong
Caption = "Set Wake Up Song"
End
Begin VB.Menu mnuSep1
Caption = "-"
End
Begin VB.Menu mnuSetWindowOnTop
Caption = "Set Window On Top"
End
End
Begin VB.Menu mnuAbout
Caption = "&About"
Begin VB.Menu mnuAboutWakeUpMe
Caption = "About Wake Me Up v1.0 Beta 1"
End
End
End
Attribute VB_Name = "frmWakeUp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim lSong As String
Dim lWoke As Boolean
Private Sub cboDayTime_KeyPress(KeyAscii As Integer)
If KeyAscii Then
KeyAscii = 0
End If
End Sub
Private Sub cboHour_KeyPress(KeyAscii As Integer)
If KeyAscii Then
KeyAscii = 0
End If
End Sub
Private Sub cboMinute_KeyPress(KeyAscii As Integer)
If KeyAscii Then
KeyAscii = 0
End If
End Sub
Private Sub chkAfter5Min_Click()
MsgBox "Not working in this version.", vbInformation, "Wake Me Up"
End Sub
Private Sub chkDontStop_Click()
MsgBox "Not working in this version.", vbInformation, "Wake Me Up"
End Sub
Private Sub chkWhenStopedPlayAgainAfter5min_Click()
MsgBox "Not working in this version.", vbInformation, "Wake Me Up"
End Sub
Private Sub cmdReset_Click()
cboHour.Enabled = False
cboMinute.Enabled = False
cboDayTime.Enabled = False
lWoke = False
End Sub
Private Sub cmdSelectSong_Click()
CommonDialog1.Filter = "Mp3 Music File (*.mp3)| *.mp3"
CommonDialog1.ShowOpen
lblWakeUpSongPTH.Caption = CommonDialog1.FileName
lSong = CommonDialog1.FileName
End Sub
Private Sub Form_Load()
lWoke = False
lblCurrentTimeD.Caption = Time
tmrTime.Enabled = True
cboHour.AddItem "1"
cboHour.AddItem "2"
cboHour.AddItem "3"
cboHour.AddItem "4"
cboHour.AddItem "5"
cboHour.AddItem "6"
cboHour.AddItem "7"
cboHour.AddItem "8"
cboHour.AddItem "9"
cboHour.AddItem "10"
cboHour.AddItem "11"
cboHour.AddItem "12"
cboMinute.AddItem "00"
cboMinute.AddItem "05"
cboMinute.AddItem "10"
cboMinute.AddItem "15"
cboMinute.AddItem "20"
cboMinute.AddItem "25"
cboMinute.AddItem "30"
cboMinute.AddItem "35"
cboMinute.AddItem "40"
cboMinute.AddItem "45"
cboMinute.AddItem "50"
cboMinute.AddItem "55"
cboDayTime.AddItem "PM"
cboDayTime.AddItem "AM"
cboHour.Text = Mid(lblCurrentTimeD, 1, InStr(1, lblCurrentTimeD, ":") - 1)
cboMinute.Text = Mid(lblCurrentTimeD, InStr(1, lblCurrentTimeD, ":") + 1, 2)
If Left(cboMinute.Text, 1) = "0" Then
cboMinute.Text = cboMinute.Text - 1
lHold% = cboMinute.Text
cboMinute.Text = "0" & lHold%
Else
cboMinute.Text = cboMinute.Text - 1
End If
cboDayTime.Text = Mid(lblCurrentTimeD, InStr(1, lblCurrentTimeD, " ") + 1, 2)
End Sub
Private Sub mnuAboutWakeUpMe_Click()
MsgBox "Wake Me Up v1.0 Beta 1" & vbCrLf & vbCrLf & _
"I take no responsibility what this program do to your computer!" & vbCrLf & _
"Created by Tom D." & vbCrLf & _
"You may contact me at: op_ivy_fx@hotmail.com", , "Wake Me Up v1.0 Beta 1"
End Sub
Private Sub tmrTime_Timer()
lblCurrentTimeD.Caption = Time
cmdReset.Enabled = False
If cboMinute.Text = "" Then
cboMinute.Text = "00"
End If
If lblWakeUpSongPTH.Caption = "" Then
txtStatus.Text = txtStatus.Text & "**** Error - There's no song specified." & vbCrLf
txtStatus.SelLength = Len(txtStatus.Text)
Exit Sub
End If
If lblWakeUpSongPTH.Caption <> "" Then
txtStatus.Text = txtStatus.Text & "**** Thanks - Song that its going to wake you is: " & lSong & vbCrLf
txtStatus.SelLength = Len(txtStatus.Text)
End If
If lWoke = False Then
If cboHour.Text = Mid(lblCurrentTimeD, 1, InStr(1, lblCurrentTimeD, ":") - 1) And _
cboMinute.Text = Mid(lblCurrentTimeD, InStr(1, lblCurrentTimeD, ":") + 1, 2) And _
cboDayTime.Text = Mid(lblCurrentTimeD, InStr(1, lblCurrentTimeD, " ") + 1, 2) Then
Call ShellExecute(hwnd, "Open", lSong, 1, lSong, 1)
cboHour.Enabled = False
cboMinute.Enabled = False
cboDayTime.Enabled = False
lWoke = True
cmdReset.Enabled = True
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -