📄 form17.frm
字号:
VERSION 5.00
Begin VB.Form Form17
Caption = "Form17"
ClientHeight = 5952
ClientLeft = 48
ClientTop = 384
ClientWidth = 8328
Icon = "Form17.frx":0000
LinkTopic = "Form17"
MDIChild = -1 'True
ScaleHeight = 5952
ScaleWidth = 8328
Begin VB.Timer Timer1
Interval = 60000
Left = 3720
Top = 2760
End
Begin VB.TextBox Text1
Height = 5532
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 240
Width = 7812
End
End
Attribute VB_Name = "Form17"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public booldirty As Boolean
Public d1 As Integer
Private Sub Form_Load()
On Error Resume Next
Me.booldirty = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
If Me.booldirty Then
Call save
End If
End Sub
Private Sub Form_Resize()
On Error Resume Next
' 将文本框充满当前子窗体的内部区域
If (ScaleHeight - 500) > 0 Then
Text1.Height = ScaleHeight - 500
Else
Text1.Height = 0
End If
If (ScaleWidth - 500) > 0 Then
Text1.Width = ScaleWidth - 500
Else
Text1.Width = 0
End If
End Sub
Sub save()
On Error Resume Next
If Me.booldirty = True Then
Open App.Path & "\" & Me.Caption & ".Txt" For Output As #1 ' 打开输出文件。
Print #1, Me.Text1.Text
Close #1
Me.booldirty = False
End If
End Sub
Private Sub Text1_Change()
On Error Resume Next
booldirty = True
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
If Len(Text1.Text) > 15000 Then
Text1.Text = Left(Text1.Text, 7500)
End If
End Sub
Public Sub Printx()
On Error Resume Next
Printer.Print Me.Caption
Printer.Print Me.Text1.Text
Printer.EndDoc
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -