📄 yxw1.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmDocument
Caption = "frmDocument"
ClientHeight = 3480
ClientLeft = 2415
ClientTop = 2145
ClientWidth = 6585
KeyPreview = -1 'True
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6.138
ScaleMode = 7 'Centimeter
ScaleWidth = 11.615
Begin RichTextLib.RichTextBox rtfText
Height = 1995
Left = 360
TabIndex = 0
Top = 480
Width = 3000
_ExtentX = 5292
_ExtentY = 3519
_Version = 393217
Enabled = -1 'True
ScrollBars = 3
TextRTF = $"yxw1.frx":0000
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuFileNew
Caption = "新建"
Shortcut = ^N
End
Begin VB.Menu mnuFileOpen
Caption = "打开..."
Shortcut = ^O
End
Begin VB.Menu mnuFileClose
Caption = "关闭"
End
Begin VB.Menu mnuFileBar0
Caption = "-"
End
Begin VB.Menu mnuFileSave
Caption = "保存"
Shortcut = ^S
End
Begin VB.Menu mnuFileSaveas
Caption = "另存为..."
End
Begin VB.Menu mnuFileBar1
Caption = "-"
End
Begin VB.Menu mnuFileProperties
Caption = "属性"
End
Begin VB.Menu mnuFilePageSetup
Caption = "页面设置..."
End
Begin VB.Menu mnuFilePrintPreview
Caption = "打印预览"
End
Begin VB.Menu mnuFilePrint
Caption = "打印..."
Shortcut = ^P
End
Begin VB.Menu mnuFileBar2
Caption = "-"
End
Begin VB.Menu mnuFilemrc1
Caption = ""
Visible = 0 'False
End
Begin VB.Menu mnuFilemrc2
Caption = ""
Visible = 0 'False
End
Begin VB.Menu mnuFilemrc3
Caption = ""
Visible = 0 'False
End
Begin VB.Menu mnuFilemrc4
Caption = ""
Visible = 0 'False
End
Begin VB.Menu mnuFileBar3
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu mnuFileExit
Caption = "退出(X)"
End
End
Begin VB.Menu mnuEdit
Caption = "编辑(&E)"
Begin VB.Menu mnuEditUndo
Caption = "撤销"
Shortcut = ^Z
End
Begin VB.Menu mnuEditBar0
Caption = "-"
End
Begin VB.Menu mnuEditCut
Caption = "剪切"
Shortcut = ^X
End
Begin VB.Menu mnuEditCopy
Caption = "复制"
Shortcut = ^C
End
Begin VB.Menu mnuEditPaste
Caption = "粘贴"
Shortcut = ^V
End
Begin VB.Menu mnuEditBar1
Caption = "-"
End
Begin VB.Menu mnuEditSelall
Caption = "全选"
Shortcut = ^A
End
Begin VB.Menu mnuEditDelete
Caption = "删除"
Shortcut = ^D
End
Begin VB.Menu mnuEditBar2
Caption = "-"
End
Begin VB.Menu mnuEditFind
Caption = "查找和替换"
Shortcut = ^F
End
Begin VB.Menu mnuEditFindnext
Caption = "查找下一个"
Shortcut = {F3}
End
End
Begin VB.Menu mnuView
Caption = "视图(&V)"
Begin VB.Menu mnuViewToolbar
Caption = "工具栏"
End
Begin VB.Menu mnuViewStatusbar
Caption = "状态栏"
End
Begin VB.Menu mnuViewBar0
Caption = "-"
End
Begin VB.Menu mnuViewOptions
Caption = "选项"
End
Begin VB.Menu mnuViewwebBrowser
Caption = "web浏览"
End
End
Begin VB.Menu mnuFormat
Caption = "格式(&O)"
Begin VB.Menu mnuFormatFont
Caption = "字体"
End
Begin VB.Menu mnuFormatFontColor
Caption = "字体颜色"
End
Begin VB.Menu mnuFormatAlign
Caption = "对齐方式"
Begin VB.Menu mnuFormatAlignLeft
Caption = "左对齐"
Checked = -1 'True
End
Begin VB.Menu mnuFormatAlignCenter
Caption = "居中"
End
Begin VB.Menu mnuFormatAlignRight
Caption = "右对齐"
End
End
Begin VB.Menu mnuFormatPara
Caption = "段落"
End
Begin VB.Menu mnuFormatNo
Caption = "项目符号和编号"
End
Begin VB.Menu mnuFormatBack
Caption = "背景"
End
End
Begin VB.Menu mnuTool
Caption = "工具(&T)"
Begin VB.Menu mnuToolStatistics
Caption = "字数统计"
End
Begin VB.Menu mnuToolSpellcheck
Caption = "拼写检查"
End
End
Begin VB.Menu mnuWindow
Caption = "窗口(&W)"
Begin VB.Menu mnuWindowNew
Caption = "新建"
End
Begin VB.Menu mnuWindowbar0
Caption = "-"
End
Begin VB.Menu mnuWindowCascade
Caption = "层叠"
Checked = -1 'True
End
Begin VB.Menu mnuWindowTileHorizontal
Caption = "水平平铺"
End
Begin VB.Menu mnuWindowTileVertical
Caption = "垂直平铺"
End
Begin VB.Menu mnuWindowArrangeIcons
Caption = "排列图标"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpContents
Caption = "内容"
End
Begin VB.Menu mnuHelpSearchForHelpon
Caption = "联机帮助"
End
Begin VB.Menu mnuHelpBar0
Caption = "-"
End
Begin VB.Menu mnuHelpAbout
Caption = "关于"
End
End
Begin VB.Menu popmnu
Caption = "弹出菜单"
Visible = 0 'False
Begin VB.Menu popcut
Caption = "剪切"
End
Begin VB.Menu popcopy
Caption = "复制"
End
Begin VB.Menu poppaste
Caption = "粘贴"
End
Begin VB.Menu separator2
Caption = "-"
End
Begin VB.Menu poppara
Caption = "段落"
End
Begin VB.Menu popfont
Caption = "字体"
End
Begin VB.Menu popcode
Caption = "项目编号"
End
End
End
Attribute VB_Name = "frmDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Unload(Cancel As Integer)
Dim stat As Integer
If TextChanged(Mid(fMainForm.ActiveForm.Caption, 10, 1)) Then
stat = MsgBox("保存对该文件的修改吗?", vbYesNoCancel Or vbDefaultButton1, "文件保存")
If stat = 6 Then
Screen.ActiveForm.mnuFileSave_Click
ElseIf stat = 7 Then
Unload Screen.ActiveForm
Else
Cancel = 1
End If
Else
Unload Screen.ActiveForm
End If
End Sub
Private Sub mnuEditFindnext_Click()
If Len(gFindString) > 0 Then
findnext
Else
mnuEditFind_Click
End If
End Sub
Private Sub mnuFormatAlignCenter_Click()
Screen.ActiveForm.rtfText.SelAlignment = rtfCenter
fMainForm.tbToolBar.Buttons(20).Value = tbrPressed
End Sub
Private Sub mnuFormatAlignLeft_Click()
Screen.ActiveForm.rtfText.SelAlignment = rtfLeft
fMainForm.tbToolBar.Buttons(19).Value = tbrPressed
End Sub
Private Sub mnuFormatAlignRight_Click()
Screen.ActiveForm.rtfText.SelAlignment = rtfRight
fMainForm.tbToolBar.Buttons(21).Value = tbrPressed
End Sub
Private Sub mnuFormatNo_Click()
With fMainForm.ActiveForm.rtfText
.SelBullet = True
End With
End Sub
Private Sub mnuFormatPara_Click()
paragraph.Show
End Sub
Private Sub mnuToolSpellcheck_Click()
SpellCheck (fMainForm.ActiveForm.rtfText.Text)
End Sub
Private Sub mnuToolStatistics_Click()
fontstatistics.Show
End Sub
Private Sub mnuViewToolbar_Click()
ViewToolbar_Click
End Sub
Private Sub popcopy_Click()
Copy_Click
mnuEditCopy.Enabled = False
mnuEditCut.Enabled = False
popcut.Enabled = False
popcopy.Enabled = False
End Sub
Private Sub popcut_Click()
Cut_Click
popcut.Enabled = False
popcopy.Enabled = False
mnuEditCut.Enabled = False
mnuEditCopy.Enabled = False
End Sub
Private Sub popfont_Click()
font_Click
End Sub
Private Sub poppaste_Click()
Paste_Click
End Sub
Private Sub rtfText_Change()
TextChanged(Mid(fMainForm.ActiveForm.Caption, 10, 1)) = True
undo = True
frmD.mnuEditUndo.Enabled = True
fMainForm.tbToolBar.Buttons(11).Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -