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

📄 fileexplo.frm

📁 改压缩包是一个用vb做的简单的记事本
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1 
   Caption         =   "我的记事本"
   ClientHeight    =   6285
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   7230
   Icon            =   "fileexplo.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   6285
   ScaleWidth      =   7230
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.StatusBar SBar1 
      Align           =   2  'Align Bottom
      Height          =   495
      Left            =   0
      TabIndex        =   15
      Top             =   5790
      Width           =   7230
      _ExtentX        =   12753
      _ExtentY        =   873
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin MSComDlg.CommonDialog comdia1 
      Left            =   2040
      Top             =   1800
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      Height          =   6615
      Left            =   0
      TabIndex        =   10
      Top             =   360
      Width           =   7215
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   6345
         Left            =   60
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   0
         Top             =   150
         Width           =   7080
      End
   End
   Begin VB.Frame Frame1 
      Height          =   455
      Left            =   0
      TabIndex        =   2
      Top             =   -70
      Width           =   7215
      Begin VB.CommandButton Command10 
         Height          =   305
         Left            =   2400
         Picture         =   "fileexplo.frx":030A
         Style           =   1  'Graphical
         TabIndex        =   14
         TabStop         =   0   'False
         ToolTipText     =   "搜索"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command9 
         Height          =   305
         Left            =   2040
         Picture         =   "fileexplo.frx":083C
         Style           =   1  'Graphical
         TabIndex        =   13
         TabStop         =   0   'False
         ToolTipText     =   "粘贴"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command8 
         Height          =   305
         Left            =   1680
         Picture         =   "fileexplo.frx":0D6E
         Style           =   1  'Graphical
         TabIndex        =   12
         TabStop         =   0   'False
         ToolTipText     =   "复制"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command7 
         Height          =   305
         Left            =   1320
         Picture         =   "fileexplo.frx":12A0
         Style           =   1  'Graphical
         TabIndex        =   11
         TabStop         =   0   'False
         ToolTipText     =   "剪切"
         Top             =   120
         Width           =   305
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   5040
         Style           =   2  'Dropdown List
         TabIndex        =   9
         TabStop         =   0   'False
         ToolTipText     =   "字号"
         Top             =   120
         Width           =   855
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   4080
         Style           =   2  'Dropdown List
         TabIndex        =   8
         TabStop         =   0   'False
         ToolTipText     =   "字体"
         Top             =   120
         Width           =   855
      End
      Begin VB.CommandButton Command6 
         Height          =   305
         Left            =   3600
         Picture         =   "fileexplo.frx":17D2
         Style           =   1  'Graphical
         TabIndex        =   7
         TabStop         =   0   'False
         ToolTipText     =   "下划线"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command5 
         Height          =   305
         Left            =   3240
         Picture         =   "fileexplo.frx":18D4
         Style           =   1  'Graphical
         TabIndex        =   6
         TabStop         =   0   'False
         ToolTipText     =   "斜体"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command4 
         Height          =   305
         Left            =   2880
         Picture         =   "fileexplo.frx":19D6
         Style           =   1  'Graphical
         TabIndex        =   5
         TabStop         =   0   'False
         ToolTipText     =   "粗体"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command3 
         Height          =   305
         Left            =   840
         Picture         =   "fileexplo.frx":1AD8
         Style           =   1  'Graphical
         TabIndex        =   4
         TabStop         =   0   'False
         ToolTipText     =   "保存"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command2 
         Height          =   305
         Left            =   480
         Picture         =   "fileexplo.frx":200A
         Style           =   1  'Graphical
         TabIndex        =   3
         TabStop         =   0   'False
         ToolTipText     =   "打开"
         Top             =   120
         Width           =   305
      End
      Begin VB.CommandButton Command1 
         Height          =   305
         Left            =   120
         Picture         =   "fileexplo.frx":253C
         Style           =   1  'Graphical
         TabIndex        =   1
         TabStop         =   0   'False
         ToolTipText     =   "新建"
         Top             =   120
         Width           =   305
      End
      Begin VB.Line Line1 
         BorderColor     =   &H80000011&
         Index           =   4
         X1              =   6000
         X2              =   6000
         Y1              =   120
         Y2              =   400
      End
      Begin VB.Line Line1 
         BorderColor     =   &H80000011&
         Index           =   3
         X1              =   3960
         X2              =   3960
         Y1              =   120
         Y2              =   400
      End
      Begin VB.Line Line1 
         BorderColor     =   &H80000011&
         Index           =   2
         X1              =   2760
         X2              =   2760
         Y1              =   120
         Y2              =   400
      End
      Begin VB.Line Line1 
         BorderColor     =   &H80000011&
         Index           =   1
         X1              =   40
         X2              =   40
         Y1              =   120
         Y2              =   400
      End
      Begin VB.Line Line1 
         BorderColor     =   &H80000011&
         Index           =   0
         X1              =   1200
         X2              =   1200
         Y1              =   120
         Y2              =   400
      End
   End
   Begin VB.Menu file 
      Caption         =   "文件"
      Begin VB.Menu pnew 
         Caption         =   "新建"
      End
      Begin VB.Menu popen 
         Caption         =   "打开"
      End
      Begin VB.Menu psave 
         Caption         =   "保存"
      End
      Begin VB.Menu psaveas 
         Caption         =   "另存为"
      End
      Begin VB.Menu fg1 
         Caption         =   "-"
      End
      Begin VB.Menu pexit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu modify 
      Caption         =   "编辑"
      Begin VB.Menu pnothis 
         Caption         =   "撤销"
      End
      Begin VB.Menu pcut 
         Caption         =   "剪切"
      End
      Begin VB.Menu pcopy 
         Caption         =   "复制"
      End
      Begin VB.Menu ppaste 
         Caption         =   "粘贴"
      End
      Begin VB.Menu pdelete 
         Caption         =   "删除"
      End
      Begin VB.Menu fg2 
         Caption         =   "-"
      End
      Begin VB.Menu pfind 
         Caption         =   "查找替换"
      End
      Begin VB.Menu filezap 
         Caption         =   "压缩文件"
         Begin VB.Menu zapline 
            Caption         =   "压缩空行"
         End
         Begin VB.Menu zapspace 
            Caption         =   "压缩空格"
         End
         Begin VB.Menu zapall 
            Caption         =   "全部压缩"
         End
      End
      Begin VB.Menu fg3 
         Caption         =   "-"
      End
      Begin VB.Menu pselectall 
         Caption         =   "全选"
      End
      Begin VB.Menu pthisdate 
         Caption         =   "日期"
      End
   End
   Begin VB.Menu options 
      Caption         =   "格式"
      Begin VB.Menu autoline 
         Caption         =   "自动换行"
      End
      Begin VB.Menu pfontname 
         Caption         =   "字体"
      End
      Begin VB.Menu fg4 
         Caption         =   "-"
      End
      Begin VB.Menu pfontitalic 
         Caption         =   "斜体"
      End
      Begin VB.Menu pfontbold 
         Caption         =   "粗体"
      End
      Begin VB.Menu pfontunderline 
         Caption         =   "下划线"
      End
      Begin VB.Menu pfontstrikethru 
         Caption         =   "删除线"
      End
      Begin VB.Menu fg5 
         Caption         =   "-"
      End
      Begin VB.Menu textfore 
         Caption         =   "前景色"
      End
      Begin VB.Menu textback 
         Caption         =   "背景色"
      End
      Begin VB.Menu fg6 
         Caption         =   "-"
      End
      Begin VB.Menu textleft 
         Caption         =   "文本左对齐"
      End
      Begin VB.Menu textright 
         Caption         =   "文本右对齐"
      End
      Begin VB.Menu textmid 
         Caption         =   "文本居中对齐"
      End
   End
   Begin VB.Menu help 
      Caption         =   "帮助"
      Begin VB.Menu psoftware 
         Caption         =   "关于记事本"
      End
      Begin VB.Menu pauthor 
         Caption         =   "关于作者"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Const EM_GETLINECOUNT = &HBA
Const EM_LINEFROMCHAR = &HC9
Dim filename1 As String, filename2 As String
Dim flag1 As Integer, flag2 As Integer
Dim notext(9) As String, oldtext As String
Public flag3 As Boolean

Private Sub cpcc(tof As Boolean)
pcut.Enabled = tof
pcopy.Enabled = tof
pdelete.Enabled = tof
Command7.Enabled = tof
Command8.Enabled = tof
End Sub
Private Sub comtf(tof As Boolean)
Command3.Enabled = tof
Command4.Enabled = tof
Command5.Enabled = tof
Command6.Enabled = tof
Command9.Enabled = tof
Command10.Enabled = tof
Combo1.Enabled = tof
Combo2.Enabled = tof
End Sub
Private Sub savefile()
Me.MousePointer = 13
If flag1 <> 3 And flag2 = 1 Then
Dim ynsave As Integer
Cancel = 1
ynsave = MsgBox("保存前一文件吗?", 68, "保存文件")
If ynsave = 6 Then
If flag1 = 0 Then
comdia1.FileName = ""
comdia1.FLAGS = 4096
comdia1.Filter = "All Files|*.*|Word Files|*.doc|Text Files|*.txt"
comdia1.FilterIndex = 3
comdia1.DialogTitle = "保存文件"
comdia1.ShowSave
If comdia1.FileName = "" Then
Me.MousePointer = 0
Exit Sub
Else
filename2 = comdia1.FileName
Open filename2 For Output As #2
End If
Else
Open filename1 For Output As #2
End If
Print #2, Text1.Text
Close #2
End If
End If
Me.MousePointer = 0
End Sub

Private Sub autoline_Click()
If autoline.Checked = True Then
'Text1.ScrollBars = 2
autoline.Checked = flase
Else
'Text1.ScrollBars = 3
autoline.Checked = True
End If
End Sub

Private Sub Combo1_click()
Text1.FontName = Combo1.Text
End Sub

Private Sub Combo2_click()
Text1.FontSize = Combo2.Text
End Sub

Private Sub Command1_Click()
If flag1 <> 3 Then
Call savefile
End If
Text1.Visible = True
Text1.Text = ""
Text1.SetFocus
flag1 = 0
flag2 = 1
comtf True
modify.Visible = True
options.Visible = True
psave.Enabled = True
psaveas.Enabled = True
pnothis.Enabled = False
oldtext = Text1.Text
For i = 0 To 9
notext(i) = ""
Next i
flag3 = True
If Clipboard.GetText() = "" Then
ppaste.Enabled = False
Command9.Enabled = False
End If
End Sub

Private Sub Command10_Click()
pfind_Click
End Sub

Private Sub Command2_Click()
Dim whole, aspect As String
If flag1 <> 3 Then
Call savefile
'Text1.Visible = False
'flag1 = 3
End If
comdia1.FileName = ""
comdia1.FLAGS = 4096
comdia1.Filter = "All Files|*.*|Word Files|*.doc|Text Files|*.txt"
comdia1.FilterIndex = 3
comdia1.DialogTitle = "打开文件"
comdia1.ShowOpen
If comdia1.FileName <> "" Then
Me.MousePointer = 13
filename1 = comdia1.FileName
Open filename1 For Input As #1
Do While Not EOF(1)
Line Input #1, aspect
whole = whole + aspect + Chr$(13) + Chr$(10)
Loop
Close #1
Text1.Visible = True
Text1.Text = whole
Text1.SetFocus
flag1 = 1
flag2 = 0
comtf True

⌨️ 快捷键说明

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