📄 frmnewtodo.frm
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmNewToDo
BorderStyle = 0 'None
Caption = "Hirdhav Digital Diary - New ToDo"
ClientHeight = 4935
ClientLeft = 0
ClientTop = 0
ClientWidth = 4950
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Icon = "frmNewToDo.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4935
ScaleWidth = 4950
StartUpPosition = 2 'CenterScreen
Begin VB.OptionButton optC
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Low"
ForeColor = &H80000008&
Height = 225
Left = 3720
TabIndex = 3
Top = 1200
Width = 735
End
Begin VB.OptionButton optB
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Medium"
ForeColor = &H80000008&
Height = 225
Left = 2640
TabIndex = 2
Top = 1200
Width = 975
End
Begin VB.OptionButton optA
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "High"
ForeColor = &H80000008&
Height = 225
Left = 1800
TabIndex = 1
Top = 1200
Width = 735
End
Begin VB.TextBox txtDesc
Appearance = 0 'Flat
Height = 1575
Left = 1800
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 8
Top = 2520
Width = 2775
End
Begin VB.TextBox txtAP1
Appearance = 0 'Flat
Height = 285
Left = 2400
MaxLength = 2
TabIndex = 5
Text = "AM"
Top = 1560
Width = 375
End
Begin VB.TextBox txtAP3
Appearance = 0 'Flat
Height = 285
Left = 2400
MaxLength = 2
TabIndex = 7
Text = "AM"
Top = 2040
Width = 375
End
Begin MSMask.MaskEdBox txtAlarmTime
Height = 285
Left = 1800
TabIndex = 6
Top = 2040
Width = 615
_ExtentX = 1085
_ExtentY = 503
_Version = 393216
Appearance = 0
MaxLength = 5
Mask = "##:##"
PromptChar = "_"
End
Begin MSMask.MaskEdBox txtFrom
Height = 285
Left = 1800
TabIndex = 4
Top = 1560
Width = 615
_ExtentX = 1085
_ExtentY = 503
_Version = 393216
Appearance = 0
MaxLength = 5
Mask = "##:##"
PromptChar = "_"
End
Begin VB.Line Line3
BorderWidth = 2
X1 = 0
X2 = 4920
Y1 = 4920
Y2 = 4920
End
Begin VB.Label lblCancelSupport
BackStyle = 0 'Transparent
Height = 495
Left = 2760
TabIndex = 12
Top = 4320
Width = 1575
End
Begin VB.Label lblOkSupport
BackStyle = 0 'Transparent
Height = 495
Left = 600
TabIndex = 10
Top = 4320
Width = 1575
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "优先级:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 915
TabIndex = 21
Top = 1200
Width = 585
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "计划类型:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 720
TabIndex = 20
Top = 480
Width = 765
End
Begin VB.Label lblType
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "To Do"
Height = 225
Left = 1800
TabIndex = 19
Top = 480
Width = 480
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日期:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1110
TabIndex = 18
Top = 840
Width = 405
End
Begin VB.Label lblDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "14/Mar/1985"
Height = 225
Left = 1800
TabIndex = 17
Top = 840
Width = 1050
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1110
TabIndex = 16
Top = 2520
Width = 405
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "开始时间:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 720
TabIndex = 15
Top = 1560
Width = 765
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "提醒时间:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 720
TabIndex = 14
Top = 2040
Width = 765
End
Begin VB.Label lblCancel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "取消"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 3240
TabIndex = 13
Top = 4440
Width = 360
End
Begin VB.Label lblOk
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确定"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 1275
TabIndex = 11
Top = 4440
Width = 360
End
Begin VB.Label lblCaptionSupport
BackStyle = 0 'Transparent
Height = 255
Left = 0
TabIndex = 9
Top = 0
Width = 4935
End
Begin VB.Label lblCaption
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Hirdhav Digital Diary - New To Do"
Height = 225
Left = 200
TabIndex = 0
Top = 10
Width = 2835
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 4935
X2 = 4935
Y1 = 240
Y2 = 5280
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 15
X2 = 0
Y1 = 240
Y2 = 5280
End
Begin VB.Shape shapeCaption
BackStyle = 1 'Opaque
BorderWidth = 2
Height = 255
Left = 20
Top = 20
Width = 4935
End
Begin VB.Shape shapeOk
BackStyle = 1 'Opaque
Height = 495
Left = 600
Top = 4320
Width = 1575
End
Begin VB.Shape shapeCancel
BackStyle = 1 'Opaque
Height = 495
Left = 2760
Top = 4320
Width = 1575
End
End
Attribute VB_Name = "frmNewToDo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public strUsername
Public Prio
Private Sub Form_Load()
Me.BackColor = RGB(145, 155, 100)
shapeCaption.BackColor = vbBlack
lblCaption.ForeColor = RGB(145, 155, 100)
strUsername = frmMain.lblUsername.Caption
lblDate.Caption = SchDate & "/" & SchMonth & "/" & SchYear
optA.BackColor = RGB(145, 155, 100)
optB.BackColor = RGB(145, 155, 100)
optC.BackColor = RGB(145, 155, 100)
shapeCancel.BackColor = RGB(145, 155, 100)
shapeOk.BackColor = RGB(145, 155, 100)
txtFrom.BackColor = RGB(145, 155, 100)
txtAlarmTime.BackColor = RGB(145, 155, 100)
txtAP1.BackColor = RGB(145, 155, 100)
txtAP3.BackColor = RGB(145, 155, 100)
txtDesc.BackColor = RGB(145, 155, 100)
End Sub
Private Sub lblCancelSupport_Click()
frmCalender.Show
Unload Me
frmSchType.Show vbModal
End Sub
Private Sub lblCancelSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblCancel.ForeColor = RGB(145, 155, 100)
shapeCancel.BackColor = vbBlack
End Sub
Private Sub lblCancelSupport_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblCancel.ForeColor = vbBlack
shapeCancel.BackColor = RGB(145, 155, 100)
End Sub
Private Sub lblCaptionSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragForm Me
End Sub
Private Sub lblOkSupport_Click()
Dim db As Database
Dim ReS As Recordset
Set db = OpenDatabase(App.Path + "\Data\" + strUsername + "\Sch.dat")
Set ReS = db.OpenRecordset(SchMonth)
ReS.AddNew
ReS("SchType") = lblType.Caption
ReS("Date") = lblDate.Caption
ReS("TF") = txtFrom.Text
ReS("AT") = txtAlarmTime.Text
ReS("AP1") = txtAP1.Text
ReS("AP3") = txtAP3.Text
ReS("Priority") = Prio
ReS("Description") = txtDesc.Text
ReS.Update
ReS.Close
db.Close
Set ReS = Nothing
Set db = Nothing
HDDMsgBox "To Do inserted successfully."
Unload frmSchType
frmCalender.Show
Unload Me
End Sub
Private Sub lblOkSupport_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblOk.ForeColor = RGB(145, 155, 100)
shapeOk.BackColor = vbBlack
End Sub
Private Sub lblOkSupport_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
shapeOk.BackColor = RGB(145, 155, 100)
lblOk.ForeColor = vbBlack
End Sub
Private Sub optA_Click()
Prio = "High"
End Sub
Private Sub optB_Click()
Prio = "Medium"
End Sub
Private Sub optC_Click()
Prio = "Low"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -