📄 docform1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form notepad
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "分析结果"
ClientHeight = 4500
ClientLeft = 45
ClientTop = 615
ClientWidth = 4125
Icon = "docform1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4500
ScaleMode = 0 'User
ScaleTop = 1000
ScaleWidth = 4125
ShowInTaskbar = 0 'False
Begin MSComDlg.CommonDialog CommonDialog1
Left = 1080
Top = 960
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "txt"
DialogTitle = "保存结果为"
Filter = ".txt"
End
Begin VB.TextBox Text1
Height = 3855
Left = 0
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 0
Width = 4095
End
Begin VB.Menu 文件
Caption = "文件"
Begin VB.Menu 打开
Caption = "打开"
End
Begin VB.Menu 保存
Caption = "保存"
End
Begin VB.Menu 另存为
Caption = "另存为"
End
End
Begin VB.Menu 打印选项
Caption = "打印选项"
End
End
Attribute VB_Name = "notepad"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Dim retvalue As Long
Private Sub Form_Load()
retvalue = SetWindowPos(Me.hwnd, -1, Me.CurrentX, Me.CurrentY, 270, 300, &H40)
'置中窗体
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
cellcurrentop = 1
cellvoltop = 1
nodevoltop = 1
End Sub
Private Sub Form_Resize()
If notepad.Width > 70 And notepad.Height > 650 Then
Text1.Width = notepad.Width - 70
Text1.Height = notepad.Height - 650
End If
End Sub
Private Sub Form_Unload(cancel As Integer)
If formstate = 1 Then
cancel = 0
Else
cancel = 1
notepad.Hide
End If
End Sub
Private Sub 保存_Click()
Dim flag As Integer
On Error GoTo marks
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
flag = 1
marks::
End Sub
Private Sub 打开_Click()
Dim flag As Integer
Dim strtry As String
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #1
Input #1, strtry
Close #1
Text1.Text = strtry
flag = 1
marks::
End Sub
Private Sub 打印选项_Click()
printoption.Show (1)
End Sub
Private Sub 另存为_Click()
Dim flag As Integer
On Error GoTo marks
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
flag = 1
marks::
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -