?? frmtip.frm
字號(hào):
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 = "在啟動(dòng)時(shí)顯示提示(&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 '內(nèi)存中的提示數(shù)據(jù)庫(kù)
Dim CurrentTip As Integer '當(dāng)前正在顯示的提示集合的索引
Private Sub DoNextTip()
'按順序遍歷提示
CurrentTip = CurrentTip + 1
If objWarns.Count < CurrentTip Then
CurrentTip = 1
End If
' 顯示它。
frmTip.DisplayCurrentTip
End Sub
Private Sub chkLoadTipsAtStartup_Click()
' 保存在下次啟動(dòng)時(shí)是否顯示此窗體
SaveSetting App.EXEName, "Options", "在啟動(dòng)時(shí)顯示提示", 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
' 察看在啟動(dòng)時(shí)是否將被顯示
ShowAtStartup = GetSetting(App.EXEName, "Options", "在啟動(dòng)時(shí)顯示提示", 1)
'標(biāo)識(shí)是否可以隱藏此對(duì)話框
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 = "沒(méi)有今日提醒……"
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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -