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

📄 textform.frm

📁 一个用vb谢的编辑文本的工具
💻 FRM
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form Form1 
   Caption         =   "Document 1"
   ClientHeight    =   3120
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   Icon            =   "TextForm.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3120
   ScaleWidth      =   4680
   WindowState     =   2  'Maximized
   Begin RichTextLib.RichTextBox text1 
      Height          =   3135
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4695
      _ExtentX        =   8281
      _ExtentY        =   5530
      _Version        =   393217
      BackColor       =   16777215
      BorderStyle     =   0
      ScrollBars      =   2
      TextRTF         =   $"TextForm.frx":030A
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   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?", 3 + 32 + 0)
    '672
    If SaveIt = 2 Then Cancel = True
    If SaveIt = 6 Then
      If file(Val(Me.Tag)) = "" Then
        On Error GoTo XSaveCancelled
        MDIForm1.CommonDialog1.Filter = "RTF Files (*.rtf)|*.rtf|Text files (*.txt)|*.txt|Ini Files (*.ini)|*.ini|Registry Files (*.log)|*.log|Depuration Files (*.dpr)|*.dpr|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

  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 + -