📄 frmtip.frm
字号:
VERSION 5.00
Begin VB.Form frmTip
Caption = "今日提醒"
ClientHeight = 3285
ClientLeft = 4605
ClientTop = 3975
ClientWidth = 5685
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3285
ScaleWidth = 5685
WhatsThisButton = -1 'True
WhatsThisHelp = -1 'True
Begin VB.CheckBox chkLoadTipsAtStartup
Caption = "在启动时显示提示(&S)"
Height = 315
Left = 120
TabIndex = 3
Top = 2940
Width = 2055
End
Begin VB.CommandButton cmdNextTip
Caption = "下一条提示(&N)"
Height = 375
Left = 4080
TabIndex = 2
Top = 600
Width = 1455
End
Begin VB.PictureBox Picture1
BackColor = &H00FFFFFF&
Height = 2715
Left = 120
Picture = "frmTip.frx":0000
ScaleHeight = 2655
ScaleWidth = 3675
TabIndex = 1
Top = 120
Width = 3735
Begin VB.Label labPage
BackColor = &H00FFFFFF&
Caption = "今日提醒..."
Height = 255
Left = 540
TabIndex = 5
Top = 180
Width = 2655
End
Begin VB.Label lblTipText
BackColor = &H00FFFFFF&
Height = 1635
Left = 180
TabIndex = 4
Top = 840
Width = 3255
End
End
Begin VB.CommandButton cmdOK
Cancel = -1 'True
Caption = "确定"
Default = -1 'True
Height = 375
Left = 4080
TabIndex = 0
Top = 120
Width = 1455
End
End
Attribute VB_Name = "frmTip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim objWarns As CWarnings '内存中的提示数据库
Dim CurrentTip As Integer '当前正在显示的提示集合的索引
Private Sub DoNextTip()
'按顺序遍历提示
CurrentTip = CurrentTip + 1
If objWarns.Count < CurrentTip Then
CurrentTip = 1
End If
' 显示它。
frmTip.DisplayCurrentTip
End Sub
Private Sub chkLoadTipsAtStartup_Click()
' 保存在下次启动时是否显示此窗体
SaveSetting App.EXEName, "Options", "在启动时显示提示", chkLoadTipsAtStartup.Value
End Sub
Private Sub cmdNextTip_Click()
DoNextTip
End Sub
Private Sub cmdOK_Click()
Unload Me
End Sub
Public Sub ShowWarn(ByRef parent As Object, boolCanHide As Boolean)
Dim oWarns As New CWarnings
Dim oWarn As New cWarning
Dim ShowAtStartup As Long
' 察看在启动时是否将被显示
ShowAtStartup = GetSetting(App.EXEName, "Options", "在启动时显示提示", 1)
'标识是否可以隐藏此对话框
If boolCanHide Then
If ShowAtStartup = 0 Then
Exit Sub
End If
End If
Me.chkLoadTipsAtStartup.Value = ShowAtStartup
Set objWarns = oWarns.Findbydate(Year(Date), Month(Date), Day(Date), True)
If objWarns.Count = 0 Then
oWarn.Msg = "没有今日提醒……"
oWarns.Add oWarn
'Exit Sub
End If
CurrentTip = 1
Call DisplayCurrentTip
Me.Show vbModeless, parent
'Me.Show vbModal, parent
Set oWarns = Nothing
End Sub
Public Sub DisplayCurrentTip()
If objWarns.Count > 0 Then
labPage.Caption = "今日提醒... 第" & CurrentTip & "条/共" & objWarns.Count & "条"
lblTipText.Caption = objWarns.Item(CurrentTip).Msg
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -