?? clockdesignfrm.frm
字號:
VERSION 5.00
Begin VB.Form Form3
Caption = "鬧鈴提醒設置"
ClientHeight = 5730
ClientLeft = 3450
ClientTop = 1470
ClientWidth = 4665
LinkTopic = "Form3"
ScaleHeight = 5730
ScaleWidth = 4665
Begin VB.CommandButton Command3
Caption = "修改"
Height = 375
Left = 1800
TabIndex = 18
Top = 5280
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 375
Left = 3240
TabIndex = 17
Top = 5280
Width = 1215
End
Begin VB.Frame Frame5
Caption = "暫時任務"
Height = 1095
Left = 120
TabIndex = 14
Top = 1320
Width = 4455
Begin VB.TextBox Text2
Height = 735
Left = 120
MultiLine = -1 'True
TabIndex = 16
Top = 240
Width = 4215
End
End
Begin VB.Frame Frame4
Caption = "永久任務"
Height = 1215
Left = 120
TabIndex = 13
Top = 0
Width = 4455
Begin VB.TextBox Text1
Height = 855
Left = 120
MultiLine = -1 'True
TabIndex = 15
Top = 240
Width = 4215
End
End
Begin VB.Frame Frame3
Caption = "選擇類型"
Height = 615
Left = 2520
TabIndex = 10
Top = 2520
Width = 2055
Begin VB.OptionButton Option4
Caption = "今次"
Height = 255
Left = 1080
TabIndex = 12
Top = 240
Width = 735
End
Begin VB.OptionButton Option3
Caption = "每日"
Height = 255
Left = 240
TabIndex = 11
Top = 240
Width = 735
End
End
Begin VB.Frame Frame1
Caption = "選擇任務"
Height = 615
Left = 120
TabIndex = 7
Top = 2520
Width = 2175
Begin VB.OptionButton Option2
Caption = "定時提醒"
Height = 255
Left = 960
TabIndex = 9
Top = 240
Width = 1095
End
Begin VB.OptionButton Option1
Caption = "鬧鈴"
Height = 255
Left = 120
TabIndex = 8
Top = 240
Width = 735
End
End
Begin VB.TextBox Datetxt
Height = 375
Left = 2520
TabIndex = 4
Top = 3480
Width = 2055
End
Begin VB.TextBox Timetxt
Height = 375
Left = 120
TabIndex = 3
Top = 3480
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "加入任務"
Height = 375
Left = 360
TabIndex = 2
Top = 5280
Width = 1215
End
Begin VB.Frame Frame2
Caption = "提醒內容"
Height = 1215
Left = 120
TabIndex = 0
Top = 3960
Width = 4455
Begin VB.TextBox Alerttxt
Height = 855
Left = 120
MultiLine = -1 'True
TabIndex = 1
Top = 240
Width = 4215
End
End
Begin VB.Label Label2
Caption = "輸入日期(yy-mm-dd)"
Height = 255
Left = 2640
TabIndex = 6
Top = 3240
Width = 1935
End
Begin VB.Label Label1
Caption = "輸入時間:(hh:mm)"
Height = 255
Left = 120
TabIndex = 5
Top = 3240
Width = 2055
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim forever As String, d As Integer
Private Sub Alerttxt_Click()
Dim ls As Integer
ls = Len(Alerttxt)
Alerttxt.SelStart = 0
Alerttxt.SelLength = ls
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
If Timetxt <> "" Then
Dim worktxt As String
If Option1.Value = True Then
worktxt = "鬧鈴"
Else
worktxt = "提醒"
End If
If Option3.Value = True Then
worktxt = worktxt + "每日"
Else
worktxt = worktxt + "今次"
End If
If Option2.Value = True Then
If Option4.Value = True Then
worktxt = worktxt + Timetxt + "#" + Datetxt + Alerttxt
b = True
Else
worktxt = worktxt + Timetxt + Alerttxt
End If
Else
worktxt = worktxt + Timetxt
End If
If Text1.Enabled = True Then
If Text1.Text <> "" Then
Text1.Text = Text1.Text + vbCrLf + worktxt
Else
Text1.Text = worktxt
End If
Open App.Path + "\forever.dat" For Output As 1
Print #1, Text1.Text
Close #1
forever = Text1.Text
ElseIf Text2.Enabled = True Then
If Text2 <> "" Then
Text2.Text = Text2.Text + vbCrLf + worktxt
Else
Text2.Text = worktxt
End If
End If
End If
End Sub
Private Sub Form_Load()
Dim inputdata As String
Open App.Path + "\forever.dat" For Input As 1
On Error Resume Next
Line Input #1, inputdata
forever = inputdata
Do While Not EOF(1)
Line Input #1, inputdata
forever = forever + vbCrLf + inputdata
Loop
Close #1
Dim sl As Integer
If clockn(0) <> "" Then
Text2.Text = "鬧鈴今次" + clockn(0)
End If
For sl = 1 To 50
If clockn(sl) <> "" Then
Text2.Text = Text2.Text + vbCrLf + "鬧鈴今次" + clockn(sl)
End If
Next sl
Text1.Text = forever
Option4.Value = True
Option2.Value = True
Text1.Enabled = True
Text2.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Text1 <> forever Then
Open App.Path + "\forever.dat" For Output As 1
Print #1, Text1.Text
Close #1
End If
Dim start As Integer, last As Integer
If Text2.Text <> "" Then
Text2.Text = Text2.Text + vbCrLf
last = InStr(1, Text2, Chr(13))
start = 1
Do While last <> 0
If Mid$(Text2, start, last - start) <> "" Then
clockn(d) = Mid$(Mid$(Text2, start, last - start), 5, 5)
d = d + 1
End If
start = last + 2
last = InStr(start, Text2, Chr(13))
Loop
End If
htoday = False
Dim a As Integer, b As Integer, c As Integer
Dim inputdata As String
Open App.Path + "\forever.dat" For Input As 1
On Error Resume Next
Do While Not EOF(1)
Line Input #1, inputdata
Select Case typetime(inputdata)
Case 1
Clockf(a) = Mid$(inputdata, 5)
a = a + 1
Case 3
Alertft(b) = Mid$(inputdata, 5, 5)
alertfms(b) = Mid$(inputdata, 10)
b = b + 1
Case 4
If Mid$(inputdata, 11, 8) = Format(Now, "yy-mm-dd") Then
htoday = True
Alertot(c) = Mid$(inputdata, 5, 5)
alertoda(c) = Mid$(inputdata, 11, 8)
alertoms(c) = Mid$(inputdata, 19)
c = c + 1
End If
End Select
Loop
alc = c - 1
Close #1
End Sub
Private Sub Option1_Click()
Datetxt.Enabled = False
Alerttxt.Enabled = False
If Option4.Value = True Then
Text1.Enabled = False
Text2.Enabled = True
End If
End Sub
Private Sub Option2_Click()
If Option4.Value = True Then
Datetxt.Enabled = True
Text1.Enabled = True
Text2.Enabled = False
Else
Datetxt.Enabled = False
End If
Alerttxt.Enabled = True
End Sub
Private Sub Option3_Click()
Text1.Enabled = True
Text2.Enabled = False
If Option2.Value = True Then
Datetxt.Enabled = False
End If
End Sub
Private Sub Option4_Click()
If Option2.Value = True Then
Text1.Enabled = True
Text2.Enabled = False
Else
Text1.Enabled = False
Text2.Enabled = True
End If
If Option2.Value = True Then
Datetxt.Enabled = True
End If
End Sub
Private Sub Timetxt_Click()
Timetxt.SelStart = 0
Timetxt.SelLength = 5
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -