📄 frmnote.frm
字号:
_ExtentX = 10610
_ExtentY = 3201
_Version = 393217
ScrollBars = 2
TextRTF = $"frmNote.frx":3512
End
Begin VB.CommandButton CmdOK
Height = 375
Left = 1320
Picture = "frmNote.frx":35AF
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "确定"
Top = 2160
Width = 375
End
Begin VB.CommandButton CmdAdd
Height = 375
Left = 360
Picture = "frmNote.frx":3739
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "添加"
Top = 2160
Width = 375
End
Begin VB.TextBox txtEditTime
DataField = "最后修改日期"
DataSource = "Data1"
Height = 375
Left = 4200
Locked = -1 'True
TabIndex = 7
ToolTipText = "最后修改日期"
Top = 2640
Width = 1935
End
Begin VB.Data Data1
Connect = "Access"
DatabaseName = "I:\programming\VB\working\Note\System\model.not"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "note"
Top = 2160
Width = 2895
End
Begin VB.TextBox txtSubject
DataField = "主题"
DataSource = "Data1"
Height = 375
Left = 120
TabIndex = 1
ToolTipText = "主题"
Top = 2640
Width = 3975
End
Begin VB.CommandButton CmdDel
Height = 375
Left = 840
Picture = "frmNote.frx":38C3
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "删除"
Top = 2160
Width = 375
End
Begin VB.Frame Frame1
Caption = "主题查找:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 1860
Left = 120
TabIndex = 25
Top = 120
Visible = 0 'False
Width = 6015
Begin VB.CommandButton CmdSearchNext
Caption = "查找下一个(&N)"
Height = 375
Left = 3720
TabIndex = 29
Top = 480
Visible = 0 'False
Width = 1455
End
Begin VB.CommandButton CmdSearch
Caption = "查找(&S)"
Default = -1 'True
Height = 375
Left = 3720
TabIndex = 28
Top = 480
Width = 1455
End
Begin VB.CheckBox CheckAllMatch
Caption = " 全匹配"
Height = 255
Left = 1800
TabIndex = 27
Top = 1080
Width = 975
End
Begin VB.ComboBox Combo
Height = 300
Left = 1320
TabIndex = 26
Top = 480
Width = 2175
End
Begin VB.Image Image1
Height = 960
Left = 240
Picture = "frmNote.frx":3A4D
Top = 600
Width = 960
End
End
Begin VB.ListBox listSubject
Height = 1860
Left = 120
TabIndex = 0
Top = 120
Width = 6015
End
Begin VB.Menu menuFile
Caption = "文件(&F)"
Begin VB.Menu menuFileOpen
Caption = "打开(&O)..."
Shortcut = ^O
End
Begin VB.Menu menuFileNew
Caption = "新建(&N)..."
Shortcut = ^N
End
Begin VB.Menu menuFileL1
Caption = "-"
End
Begin VB.Menu menuFileSaveAs
Caption = "当前记录另存为..."
End
Begin VB.Menu menuFileL2
Caption = "-"
End
Begin VB.Menu menuFileRecent
Caption = ""
Index = 0
Visible = 0 'False
End
Begin VB.Menu menuFileL3
Caption = "-"
End
Begin VB.Menu menuFileCloseDatabase
Caption = "关闭(&C)"
End
End
Begin VB.Menu menuOperat
Caption = "记录操作(&O)"
Begin VB.Menu menuOperatAdd
Caption = "添加一条记录(&A)"
End
Begin VB.Menu menuOperatDel
Caption = "删除当前纪录(&D)"
End
Begin VB.Menu menuOperatOK
Caption = "确定(&O)"
End
Begin VB.Menu menuOperatL1
Caption = "-"
End
Begin VB.Menu menuOperatSearch
Caption = "主题查找(&S)..."
End
End
Begin VB.Menu menuEdit
Caption = "文本编辑(&E)"
Begin VB.Menu menuEditUndo
Caption = "撤消(&Z) Ctrl+Z"
End
Begin VB.Menu menuEditL0
Caption = "-"
End
Begin VB.Menu menuEditCut
Caption = "剪切(&X) Ctrl+X"
End
Begin VB.Menu menuEditCopy
Caption = "复制(&C) Ctrl+C"
End
Begin VB.Menu menuEditPaste
Caption = "粘贴(&V) Ctrl+V"
End
Begin VB.Menu menuEditAll
Caption = "全选(&A) Ctrl+A"
End
Begin VB.Menu menuEditL1
Caption = "-"
End
Begin VB.Menu menuEditColour
Caption = "颜色(&R)..."
End
Begin VB.Menu menuEditFont
Caption = "字体(&F)..."
End
Begin VB.Menu menuEditL2
Caption = "-"
End
Begin VB.Menu menuEditEncrypt
Caption = "加密(&E)"
End
Begin VB.Menu menuEditDecrypt
Caption = "解密(&U)"
End
End
Begin VB.Menu menuQEdit
Caption = "RTF 右键菜单"
Visible = 0 'False
Begin VB.Menu menuQEditUndo
Caption = "撤消(&Z)"
End
Begin VB.Menu menuQEditL0
Caption = "-"
End
Begin VB.Menu menuQEditCut
Caption = "剪切(&X)"
End
Begin VB.Menu menuQEditCopy
Caption = "复制(&C)"
End
Begin VB.Menu menuQEditPaste
Caption = "粘贴(&V)"
End
Begin VB.Menu menuQEditAll
Caption = "全选(&A)"
End
Begin VB.Menu menuQEditL1
Caption = "-"
End
Begin VB.Menu menuQEditColour
Caption = "颜色(&R)..."
End
Begin VB.Menu menuQEditFont
Caption = "字体(&F)..."
End
End
Begin VB.Menu menuOption
Caption = "选项(&O)"
Begin VB.Menu menuOptionCipher
Caption = "设置密码(&C)..."
End
Begin VB.Menu menuOptionL1
Caption = "-"
End
Begin VB.Menu menuOptionParameter
Caption = "修改参数(P)..."
End
End
Begin VB.Menu menuHelp
Caption = "帮助(&H)"
Begin VB.Menu menuHelpSubject
Caption = "帮助主题(&H)"
End
Begin VB.Menu menuHelpReadme
Caption = "自述文件(&R)"
End
Begin VB.Menu menuHelpSentmail
Caption = "写信给我(&M)"
End
Begin VB.Menu menuHelpWeb
Caption = "到我的网站来看看(&W)"
End
Begin VB.Menu menuHelpL1
Caption = "-"
End
Begin VB.Menu menuHelpAbout
Caption = "关于 Note (&A)..."
End
End
End
Attribute VB_Name = "frmNote"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'//////////////////////////////////////////////////////
'/// for GetWindowsDirectory
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
'//////////////////////////////////////////////////////
'/// for BitMapsMenu
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
Const myflage = &H400&
'//////////////////////////////////////////////////////
'/// constom
Private add As Boolean '上一个动作是添加
Private ok As Boolean '上一个动作是确定
Private loadfinished As Boolean '如 form 的 load 结束,可进行各控件与记录相关的操作。
Private LastPosition As String 'for search
Private Sub Form_Activate()
Dim i As Integer
For i = 1 To RecentCount
Load menuFileRecent(i)
menuFileRecent(i).Caption = "&" & i & " " & Recent(RecentCount - i + 1)
menuFileRecent(i).Visible = True
Next
End Sub
Private Sub Form_Deactivate()
Dim i As Integer
For i = 1 To menuFileRecent.Count - 1
Unload menuFileRecent(i)
Next
End Sub
Private Sub Form_Load()
Me.Caption = "Note - " & FName
Data1.DatabaseName = FName
Me.Width = 7005
Me.Height = 7290
'/////////////////////////////////////////////////////////////
'/// 将当前数据库名 FName 存入数组,加入 Recent.ini
'判断 当前数据库名 FName 是否已存在于 Recent() 数组
Dim i As Integer, j As Integer
Dim flag As Boolean
flag = False
For i = 1 To RecentCount
If Recent(i) = FName Then '如果已存在于 Recent() 数组
'将 当前数据库名 FName 存入 Recent() 数组末,并删除重复的纪录
For j = i To RecentCount - 1
Recent(j) = Recent(j + 1)
Next
Recent(RecentCount) = FName
flag = True
Exit For
End If
Next
'当前数据库名 FName 不存在于 Recent() 数组
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -