📄 master.frm
字号:
JustChanged = True
ChildForms(frm).Text1.SelText = PFile(frm)
End Sub
Private Sub mnuInsertTimeLong_Click()
form7.Show vbModal
End Sub
Private Sub mnuInsertTimeMedium_Click()
UndoText(frm) = ChildForms(frm).Text1.Text
JustChanged = True
ChildForms(frm).Text1.SelText = Format(Time$, "Medium Time")
End Sub
Private Sub mnuInsertTimeShort_Click()
UndoText(frm) = ChildForms(frm).Text1.Text
JustChanged = True
ChildForms(frm).Text1.SelText = Format(Time$, "Short Time")
End Sub
Private Sub mnuless_Click()
ChildForms(frm).Text1.SelIndent = ChildForms(frm).Text1.SelIndent - 1
End Sub
Private Sub mnuMinimizeAll_Click()
For X = 1 To 30
If UnAvail(X) = True Then
ChildForms(X).WindowState = 1
End If
Next
End Sub
Private Sub mnumore_Click()
ChildForms(frm).Text1.SelIndent = ChildForms(frm).Text1.SelIndent + 0.5
End Sub
Private Sub mnunew_Click()
Dim ret As Integer
DocTemp = FirstAvail
If DocTemp <> -1 Then
Set ChildForms(DocTemp) = New Form1
ChildForms(DocTemp).Caption = "Document " & DocTemp
ChildForms(DocTemp).Tag = DocTemp
file(frm) = ""
PFile(frm) = ""
Else
MsgBox "You are only allowed 30 documents opened at one time."
End If
End Sub
Private Sub mnuNextDoc_Click()
Dim Current As Integer
Current = frm
For X = Current + 1 To 30
If UnAvail(X) = True Then
ChildForms(X).SetFocus
Exit Sub
End If
Next
For X = 1 To Current - 1
If UnAvail(X) = True Then
ChildForms(X).SetFocus
Exit Sub
End If
Next
End Sub
Private Sub mnunoscript_Click()
ChildForms(frm).Text1.SelCharOffset = 0
End Sub
Private Sub mnuOpen_Click()
Dim FileStr As String, FileN As String
Dim TempStr As String, DotPos As Integer
UndoText(frm) = ChildForms(frm).Text1.TextRTF
JustChanged = True
On Error GoTo OpenCanceled
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 (*.*)|*.*"
CommonDialog1.Flags = &H4
CommonDialog1.ShowOpen
If CommonDialog1.filename = "" Then Exit Sub
Open CommonDialog1.filename For Input As #1
FileStr = ""
Do Until EOF(1)
Line Input #1, TempStr
FileStr = FileStr & TempStr & Chr$(13) & Chr$(10)
Loop
ChildForms(frm).Caption = CommonDialog1.FileTitle
Opened = True
ChildForms(frm).Text1.TextRTF = ""
Opened = True
ChildForms(frm).Text1.TextRTF = FileStr
file(frm) = CommonDialog1.FileTitle
PFile(frm) = CommonDialog1.filename
Close #1
OpenCanceled:
End Sub
Private Sub mnuopts_Click()
Form6.Show vbModal
'Dim UserInput
'UserInput = InputBox("Please type a number. Example: 3 means 3 minutes", "Auto Save Options")
'If UserInput = "" Then
'MsgBox ("You did not type anything or pressed Cancel.")
'If Not IsNumeric(UserInput) Then Exit Sub
'MsgBox "Invalid number!"
'Txtuserinput = "0"
'txtrepitition = "0"
'tmrAutoSave.Enabled = False
'Else
'Txtuserinput = UserInput
'tmrAutoSave.Enabled = True
'End If
End Sub
Private Sub mnuPaste_Click()
UndoText(frm) = ChildForms(frm).Text1.Text
JustChanged = True
ChildForms(frm).Text1.SelText = Clipboard.GetText
End Sub
Private Sub mnuPreviousDoc_Click()
Dim Current As Integer
Current = frm
For X = Current - 1 To 1 Step -1
If UnAvail(X) = True Then
ChildForms(X).SetFocus
Exit Sub
End If
Next
For X = 30 To Current + 1 Step -1
If UnAvail(X) = True Then
ChildForms(X).SetFocus
Exit Sub
End If
Next
End Sub
Private Sub mnuPrint_Click()
On Error GoTo PrintCanceled:
CommonDialog1.Flags = DefaultFlags
CommonDialog1.ShowPrinter
Printer.Copies = CommonDialog1.Copies
If ChildForms(frm).Text1.SelText = "" Then
Printer.Print ChildForms(frm).Text1.Text
Else
Printer.Print ChildForms(frm).Text1.SelText
End If
PrintCanceled:
End Sub
Private Sub mnuruler_Click()
If mnuruler.Checked = True Then
mnuruler.Checked = False
CoolBar2.Visible = False
Picture1.Visible = False
Else
mnuruler.Checked = True
CoolBar2.Visible = True
Picture1.Visible = True
End If
End Sub
Private Sub mnuSave_Click()
If CommonDialog1.filename = "" Then
mnuSaveAs_Click
Else
Open CommonDialog1.filename For Output As #1
Print #1, ChildForms(frm).Text1.Text
Close #1
If NeedSaved(frm) = True Then
NeedSaved(frm) = False
ChildForms(frm).Caption = Right$(ChildForms(frm).Caption, Len(ChildForms(frm).Caption) - 1)
End If
End If
End Sub
Private Sub mnuSaveAs_Click()
On Error GoTo SaveCancelled
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 (*.*)|*.*"
CommonDialog1.ShowSave
If CommonDialog1.filename = "" Then Exit Sub
Open CommonDialog1.filename For Output As #1
Print #1, ChildForms(frm).Text1.TextRTF
Close #1
If NeedSaved(frm) = True Then
NeedSaved(frm) = False
ChildForms(frm).Caption = Right$(ChildForms(frm).Caption, Len(ChildForms(frm).Caption) - 1)
End If
ChildForms(frm).Caption = CommonDialog1.FileTitle
file(frm) = CommonDialog1.FileTitle
PFile(frm) = CommonDialog1.filename
SaveCancelled:
End Sub
Private Sub mnuSelectAll_Click()
ChildForms(frm).Text1.SelStart = 0
ChildForms(frm).Text1.SelLength = Len(ChildForms(frm).Text1.Text)
End Sub
Private Sub mnuspell_Click()
On Error Resume Next
Dim I As Long
StatusBar1.Panels(1).Text = "Checking ... please wait"
StatusBar1.Panels(1).ToolTipText = "Double Click here to Cancel Correction."
ProgressBar1.Visible = True
ProgressBar1.Max = Len(ChildForms(frm).Text1.Text)
ChildForms(frm).Text1.Enabled = False
Diccionario = AbrirDicc
RevisarPal 1, ChildForms(frm).Text1.Text
For I = 1 To Len(ChildForms(frm).Text1.Text)
ProgressBar1.Value = I
If CancelarCorreccion = True Then GoTo H
If Mid(ChildForms(frm).Text1.Text, I, 1) = Chr(10) Then RevisarPal I + 1, ChildForms(frm).Text1.Text
If InStr(Signos, Mid(ChildForms(frm).Text1.Text, I, 1)) > 0 Then RevisarPal I + 1, ChildForms(frm).Text1.Text
DoEvents
Next
H:
CancelarCorreccion = False
ProgressBar1.Visible = False
StatusBar1.Panels(1).Text = "Welcome to XtremePad."
ChildForms(frm).Text1.Enabled = True
StatusBar1.Panels(1).ToolTipText = ""
End Sub
Private Sub mnusub_Click()
ChildForms(frm).Text1.SelCharOffset = -55
End Sub
Private Sub mnusuper_Click()
ChildForms(frm).Text1.SelCharOffset = 55
End Sub
Private Sub mnuUndo_Click()
Debug.Print UndoText(frm)
If UndoText(frm) = "" Then
retval = SendMessage(ChildForms(frm).Text1.hwnd, EM_UNDO, 0&, 0&)
Else
ChildForms(frm).Text1.Text = UndoText(frm)
End If
End Sub
Private Sub Picture2_Click()
mnuconfig_Click
End Sub
Private Sub Picture1_Click()
On Error GoTo error
mnuconfig_Click
error:
Exit Sub
End Sub
Private Sub ProgressBar1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu mnuview
End Sub
Private Sub sdfsdf_Click()
End Sub
Private Sub Timer1_Timer()
MDIForm1.StatusBar1.Panels(2).Text = Format(Now, "HH:MM:SS")
End Sub
Private Sub Timer2_Timer()
MDIForm1.StatusBar1.Panels(3).Text = Format(Now, "DD/MM/YY")
End Sub
Private Sub tmrAutoSave_Timer()
txtrepitition = Val(txtrepitition) + 1
On Error Resume Next
If Val(txtrepitition) = Txtuserinput * 60 Then
txtrepitition = "0"
If ChildForms(frm).Text1.Text = "" Then Exit Sub
mnuSave_Click
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "Nuevo"
mnunew_Click
Case "Abrir"
mnuOpen_Click
Case "Guardar"
mnuSave_Click
Case "Deshacer"
mnuUndo_Click
Case "Imprimir"
mnuPrint_Click
Case "Buscar"
Form3.Show
Case "Configurar"
mnuconfig_Click
Case "Cortar"
mnuCut_Click
Case "Copiar"
mnuCopy_Click
Case "Pegar"
mnuPaste_Click
Case "Negrita"
CheckBold_Click
Case "Cursiva"
CheckItalic_Click
Case "Subrayado"
CheckStrikeLine_Click
Case "Izquierda"
ChildForms(frm).Text1.SelAlignment = rtfLeft
ChildForms(frm).Text1.SetFocus
Case "Centrado"
ChildForms(frm).Text1.SelAlignment = rtfCenter
ChildForms(frm).Text1.SetFocus
Case "Derecha"
ChildForms(frm).Text1.SelAlignment = rtfRight
ChildForms(frm).Text1.SetFocus
Case "Punto"
Point MDIForm1.ActiveForm
End Select
End Sub
Private Sub Toolbar1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu mnuview
End Sub
Private Sub Toolbar2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu mnuview
End Sub
Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "Web"
mnuhtml_Click
Case "Calculator"
mnucalc_Click
Case "Time"
mnudate_Click
Case "Font"
PopupMenu mnucase
Case "Spell"
mnuspell_Click
End Select
End Sub
Private Sub tools_Click()
If tools.Checked = True Then
Toolbar3.Visible = False
tools.Checked = False
Else
tools.Checked = False
Toolbar3.Visible = True
tools.Checked = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -