⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmnotepad2form.frm

📁 简单记事本
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Document 1"
   ClientHeight    =   3135
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3135
   ScaleWidth      =   4680
   Begin VB.TextBox Text1 
      Height          =   3135
      HideSelection   =   0   'False
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   0
      Top             =   0
      Width           =   4695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Form_Resize()
If Me.WindowState = 1 Then Exit Sub
Text1.Width = Me.Width - 105
Text1.Height = Me.Height - 405
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim SaveIt As Integer
If NeedSaved(Val(Me.Tag)) = True Then
  SaveIt = MsgBox("This Document has been changed.  Do you wish to save?", vbYesNoCancel)
  '672
  If SaveIt = 2 Then Exit Sub
  If SaveIt = 6 Then
   If File(Val(Me.Tag)) = "" Then
    On Error GoTo XSaveCancelled
    MDIForm1.CommonDialog1.Filter = "Text Files (*.TXT)|*.txt|All Files (*.*)|*.*"
    MDIForm1.CommonDialog1.Flags = &H4
    MDIForm1.CommonDialog1.ShowSave
    If MDIForm1.CommonDialog1.filename = "" Then GoTo XSaveCancelled
    Open MDIForm1.CommonDialog1.filename For Output As #1
      Print #1, Me.Text1.Text
    Close #1
XSaveCancelled:
   Else
    Open MDIForm1.CommonDialog1.filename For Output As #1
     Print #1, Me.Text1.Text
    Close #1
  End If
End If
    
End If
Set ChildForms(Val(Me.Tag)) = Nothing
UnAvail(Val(Me.Tag)) = False
Unload Me
End Sub

Private Sub Text1_Change()
If JustChanged = False Then
UndoText(frm) = ""
End If
Debug.Print Opened
If Opened = False And NeedSaved(Val(Me.Tag)) = False Then
 NeedSaved(Val(Me.Tag)) = True
 Me.Caption = "*" & Me.Caption
End If
Opened = False
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -