📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.Form FrmMain
BorderStyle = 1 'Fixed Single
Caption = "《数据结构》算法速查器"
ClientHeight = 7845
ClientLeft = 150
ClientTop = 720
ClientWidth = 9270
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7845
ScaleWidth = 9270
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
BackColor = &H80000013&
Caption = "文本内容"
ForeColor = &H00FF0000&
Height = 6135
Left = 3240
TabIndex = 5
Top = 1440
Width = 5775
Begin VB.TextBox Txt_Show
Height = 5535
Left = 240
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 6
Top = 360
Width = 5295
End
End
Begin VB.Frame Frame1
BackColor = &H80000013&
Caption = "查找/检索"
ForeColor = &H00FF0000&
Height = 5655
Left = 120
TabIndex = 1
Top = 1440
Width = 2775
Begin VB.ListBox List_Select
Height = 3120
ItemData = "FrmMain.frx":0000
Left = 240
List = "FrmMain.frx":0007
TabIndex = 4
Top = 2040
Width = 2295
End
Begin VB.CommandButton Cmd_Refresh
Caption = "刷新"
Height = 375
Left = 960
TabIndex = 3
Top = 1320
Width = 855
End
Begin VB.TextBox Txt_Find
Height = 375
Left = 240
TabIndex = 2
Top = 600
Width = 2295
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H80000013&
Caption = "请输入需查询的关键字:"
Height = 180
Left = 240
TabIndex = 8
Top = 360
Width = 1980
End
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "SISE G624 (2006)"
Height = 180
Left = 720
TabIndex = 7
Top = 7320
Width = 1530
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FF0000&
Caption = "《数据结构》算法速查器"
BeginProperty Font
Name = "方正姚体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 360
Left = 120
TabIndex = 0
Top = 240
Width = 3465
End
Begin VB.Image Image1
Height = 1215
Left = 0
Picture = "FrmMain.frx":0018
Stretch = -1 'True
Top = 0
Width = 9255
End
Begin VB.Menu mnuSys
Caption = "系统维护"
Begin VB.Menu mnuPwd
Caption = "修改当前操作员密码"
End
Begin VB.Menu DelUser
Caption = "删除用户"
Visible = 0 'False
End
Begin VB.Menu mnuExit
Caption = "退出系统"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助"
Begin VB.Menu mnuInfo
Caption = "系统信息"
End
Begin VB.Menu mnuAbout
Caption = "关于"
End
End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Refresh_Click()
Txt_Find.Text = ""
Txt_Find.SetFocus
End Sub
Private Sub DelUser_Click()
frmDelUser.Move (Screen.Width - frmDelUser.Width) / 2, (Screen.Height - frmDelUser.Height) / 2
frmDelUser.Show
End Sub
Private Sub Form_Load()
'置中窗体
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
'根据当前地域类型装入数据
Loadtitle
End Sub
Private Sub Loadtitle()
Dim i As Integer
List_Select.Clear
MyInformation.Load_Title
Do While t(i) <> ""
List_Select.AddItem t(i) '把标题添加到List_Select列表框中
i = i + 1
Loop
End Sub
Private Sub List_Select_Click()
'If List_Select.Index = 0 Then
' Txt_Show = ""
'End If
Txt_Show = ""
Dim st As String, Fpath As String, FileName As String
MyInformation.GetInfo (List_Select.Text)
FileName = MyInformation.Signal
Fpath = App.Path & "\ds_txt\" & FileName
Open Fpath For Input As #1 ' 打开文件
Do While Not EOF(1) ' 读入文件,并将其显示在文本框中
Line Input #1, st
Txt_Show.Text = Txt_Show.Text + st + vbCrLf
Loop
Close #1 ' 关闭文件
End Sub
Private Sub mnuAbout_Click()
'置中窗体
Frm_About.Move (Screen.Width - Frm_About.Width) / 2, (Screen.Height - Frm_About.Height) / 2
Frm_About.Show
End Sub
Private Sub mnuExit_Click()
End
End Sub
Private Sub mnuInfo_Click()
frmtip.Move (Screen.Width - frmtip.Width) / 2, (Screen.Height - frmtip.Height) / 2
frmtip.Show
End Sub
Private Sub mnuPwd_Click()
FrmUpdate.Move (Screen.Width - FrmUpdate.Width) / 2, (Screen.Height - FrmUpdate.Height) / 2
FrmUpdate.Show
FrmUpdate.Label_ID.Caption = now
End Sub
Private Sub Txt_Find_Change()
Dim strFind As String
Dim strAll As String
Dim strNum As Integer
strNum = -1
If Txt_Find <> "" Then
strFind = Txt_Find.Text
strAll = "*" + Txt_Find.Text + "*"
For i = 0 To List_Select.ListCount - 1
If List_Select.List(i) = strFind Then
List_Select.ListIndex = i
Exit For
End If
If List_Select.List(i) Like strAll Then
If strNum = -1 Then
strNum = i
End If
End If
If i = List_Select.ListCount - 1 Then
If strNum <> -1 Then
List_Select.ListIndex = strNum
End If
End If
Next
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -