📄 warnhis.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form WarnHis
BorderStyle = 1 'Fixed Single
Caption = "历史记录浏览"
ClientHeight = 5130
ClientLeft = 4275
ClientTop = 1470
ClientWidth = 6840
Icon = "WarnHis.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5130
ScaleWidth = 6840
Begin VB.CommandButton Close
Caption = "关 闭"
Height = 375
Left = 2880
TabIndex = 1
Top = 4680
Width = 1575
End
Begin VB.TextBox HisData
Height = 4455
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 120
Width = 6615
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 330
Left = 960
TabIndex = 2
Top = 4680
Width = 1365
_ExtentX = 2408
_ExtentY = 582
_Version = 393216
Format = 48103425
CurrentDate = 38166
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "选择日期:"
Height = 180
Left = 0
TabIndex = 3
Top = 4680
Width = 900
End
End
Attribute VB_Name = "WarnHis"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TempPath As String
Private Sub Close_Click()
Unload Me
End Sub
Private Sub DTPicker1_Change()
If DTPicker1.Value < Date Then
DataRefresh DTPicker1.Value
End If
End Sub
Private Sub DataRefresh(UpDate As Date)
Dim fso, f
On Error GoTo HandleErr
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(TempPath & "\" & Format(UpDate, "yyyy-mm-dd") & ".Rec", 1, True)
HisData = f.ReadAll
Exit Sub
HandleErr:
Err.Clear
HisData = ""
End Sub
Private Sub Form_Resize()
On Error GoTo HandleErr
TempPath = datPaths & "\history\" & Me.Tag
DTPicker1.Value = Format(Date, "yyyy-mm-dd")
DataRefresh DTPicker1.Value
Exit Sub
HandleErr:
Err.Clear
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -