📄 frmmain.frm
字号:
Dim f As New student
f.Show
End Sub
Private Sub mnuDatalook_Click()
Dim f As New output1
f.Show
End Sub
Private Sub mnuDatafxscore_Click()
Dim f As New fxscore
f.Show
End Sub
Private Sub mnuDatafrmscore_Click()
Dim f As New frmscore
f.Show
End Sub
Private Sub mnuDatacxscore_Click()
Dim f As New cxscore
f.Show
End Sub
Private Sub mnuDatacxcount_Click()
Dim f As New cxcount
f.Show
End Sub
Private Sub mnuDatacourse_Click()
Dim f As New course
f.Show
End Sub
Private Sub mnuDatabybkcount_Click()
Dim f As New bybkcount
f.Show
End Sub
Private Sub mnuxs_Click()
Dim f As New student
f.Show
End Sub
Private Sub mnuDatabkscore_Click()
Dim f As New input3
f.Show
End Sub
Private Sub mnuDatabk5count_Click()
Dim f As New bk5count
f.Show
End Sub
Private Sub mnuDataxxscore_Click()
Dim f As New input2
f.Show
End Sub
Private Sub mnujd_Click()
Dim f As New output2
f.Show
End Sub
Private Sub mnumd_Click()
Dim f As New start2
f.Show
End Sub
Private Sub mnuxx_Click()
Dim f As New start3
f.Show
End Sub
Private Sub munbx_Click()
Dim f As New start
f.Show
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "新建"
LoadNewDoc
Case "打开"
mnuFileOpen_Click
Case "保存"
mnuFileSave_Click
Case "打印"
mnuFilePrint_Click
Case "剪切"
mnuEditCut_Click
Case "复制"
mnuEditCopy_Click
Case "粘贴"
mnuEditPaste_Click
Case "左对齐"
ActiveForm.rtfText.SelAlignment = rtfLeft
Case "置中"
ActiveForm.rtfText.SelAlignment = rtfCenter
Case "右对齐"
ActiveForm.rtfText.SelAlignment = rtfRight
End Select
End Sub
Private Sub mnuWindowTileVertical_Click()
Me.Arrange vbTileVertical
End Sub
Private Sub mnuWindowTileHorizontal_Click()
Me.Arrange vbTileHorizontal
End Sub
Private Sub mnuEditPasteSpecial_Click()
'应做:添加 'mnuEditPasteSpecial_Click' 代码。
MsgBox "添加 'mnuEditPasteSpecial_Click' 代码。"
End Sub
Private Sub mnuEditPaste_Click()
On Error Resume Next
ActiveForm.rtfText.SelRTF = Clipboard.GetText
End Sub
Private Sub mnuEditCopy_Click()
On Error Resume Next
Clipboard.SetText ActiveForm.rtfText.SelRTF
End Sub
Private Sub mnuEditCut_Click()
On Error Resume Next
Clipboard.SetText ActiveForm.rtfText.SelRTF
ActiveForm.rtfText.SelText = vbNullString
End Sub
Private Sub mnuEditUndo_Click()
'应做:添加 'mnuEditUndo_Click' 代码。
MsgBox "添加 'mnuEditUndo_Click' 代码。"
End Sub
Private Sub mnuFileExit_Click()
'卸载窗体
Unload Me
End Sub
Private Sub mnuFileSend_Click()
'应做:添加 'mnuFileSend_Click' 代码。
MsgBox "添加 'mnuFileSend_Click' 代码。"
End Sub
Private Sub mnuFilePrint_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With
End Sub
Private Sub mnuFilePrintPreview_Click()
'应做:添加 'mnuFilePrintPreview_Click' 代码。
MsgBox "添加 'mnuFilePrintPreview_Click' 代码。"
End Sub
Private Sub mnuFilePageSetup_Click()
On Error Resume Next
With dlgCommonDialog
.DialogTitle = "页面设置"
.CancelError = True
.ShowPrinter
End With
End Sub
Private Sub mnuFileSaveAll_Click()
'应做:添加 'mnuFileSaveAll_Click' 代码。
MsgBox "添加 'mnuFileSaveAll_Click' 代码。"
End Sub
Private Sub mnuFileSaveAs_Click()
Dim sFile As String
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "另存为"
.CancelError = False
'ToDo: 设置 common dialog 控件的标志和属性
.Filter = "所有文件 (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.Caption = sFile
ActiveForm.rtfText.SaveFile sFile
End Sub
Private Sub mnuFileSave_Click()
Dim sFile As String
If Left$(ActiveForm.Caption, 8) = "Document" Then
With dlgCommonDialog
.DialogTitle = "保存"
.CancelError = False
'ToDo: 设置 common dialog 控件的标志和属性
.Filter = "所有文件 (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.SaveFile sFile
Else
sFile = ActiveForm.Caption
ActiveForm.rtfText.SaveFile sFile
End If
End Sub
Private Sub mnuFileClose_Click()
'应做:添加 'mnuFileClose_Click' 代码。
MsgBox "添加 'mnuFileClose_Click' 代码。"
End Sub
Private Sub mnuFileOpen_Click()
Dim sFile As String
If ActiveForm Is Nothing Then LoadNewDoc
With dlgCommonDialog
.DialogTitle = "打开"
.CancelError = False
'ToDo: 设置 common dialog 控件的标志和属性
.Filter = "所有文件 (*.*)|*.*"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.LoadFile sFile
ActiveForm.Caption = sFile
End Sub
Private Sub mnuFileNew_Click()
LoadNewDoc
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -