📄 frmshowwarn.frm
字号:
VERSION 5.00
Begin VB.Form frmShowWarn
BorderStyle = 3 'Fixed Dialog
Caption = "今日提醒"
ClientHeight = 3060
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6030
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3060
ScaleWidth = 6030
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdNext
Caption = "下一条>>"
Height = 375
Left = 3180
TabIndex = 5
Top = 2400
Width = 1215
End
Begin VB.CommandButton cmdPre
Caption = "<<上一条"
Height = 375
Left = 1920
TabIndex = 4
Top = 2400
Width = 1215
End
Begin VB.TextBox txtWarnMsg
Appearance = 0 'Flat
BackColor = &H8000000F&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 1455
Left = 360
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "frmShowWarn.frx":0000
Top = 720
Width = 5295
End
Begin VB.CommandButton cmdClose
Caption = "关闭"
Height = 375
Left = 4440
TabIndex = 0
Top = 2400
Width = 1215
End
Begin VB.Label labPage
Caption = "labPage"
ForeColor = &H00C00000&
Height = 255
Left = 240
TabIndex = 3
Top = 2460
Width = 1455
End
Begin VB.Label labTitle
AutoSize = -1 'True
Caption = "今日提醒"
ForeColor = &H8000000D&
Height = 180
Left = 240
TabIndex = 1
Top = 240
Width = 720
End
End
Attribute VB_Name = "frmShowWarn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private objWarns As CWarnings '今日所有提醒
Private intCurWarn As Integer '当前显示的提醒序号
Private Sub cmdNext_Click()
intCurWarn = intCurWarn + 1
SetStatus
SetMsg
End Sub
Private Sub cmdPre_Click()
intCurWarn = intCurWarn - 1
SetStatus
SetMsg
End Sub
Public Sub ShowWarn()
Dim oWarns As New CWarnings
Set objWarns = oWarns.Findbydate(0, 5, 29, True)
If objWarns.Count = 0 Then
MsgBox "没有今日提醒!", vbInformation + vbOKOnly
Else
intCurWarn = 1
labTitle.Caption = "今日提醒:" & Date
SetStatus
Call SetMsg
Me.Show vbModal
End If
Set oWarns = Nothing
End Sub
Private Sub OKButton_Click()
Me.Hide
End Sub
Private Sub SetMsg()
labPage.Caption = "第" & intCurWarn & "条/共" & objWarns.Count & "条"
txtWarnMsg.Text = objWarns.Item(intCurWarn).Msg
End Sub
Private Sub SetStatus()
cmdNext.Enabled = False
cmdPre.Enabled = False
If intCurWarn < objWarns.Count Then
cmdNext.Enabled = True
End If
If intCurWarn > 1 Then
cmdPre.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -