📄 modulemdi.bas
字号:
Attribute VB_Name = "ModuleMDI"
Global mdicase As Integer
Global lastfrm As Integer
Global frmoffice(1 To 5) As New frmoffice
Public fMainForm As frmMDI
Public lDocumentCount As Integer
Public history(1 To 10) As String
Public tempoffset As Integer
Public MDIpassword As String
Public Function exitproject()
Dim response As Integer
response = MsgBox("真的要退出程序吗?", vbYesNo, "退出")
If response = vbYes Then
End
Else
End If
End Function
Public Function protect()
MsgBox "被保护的文本不能进行格式设置!"
End Function
Sub LoadResStrings(frm As Form)
On Error Resume Next
Dim ctl As Control
Dim obj As Object
Dim fnt As Object
Dim sCtlType As String
Dim nVal As Integer
'设置窗体的 caption 属性
frm.Caption = LoadResString(CInt(frm.Tag))
'设置字体
Set fnt = frm.Font
fnt.Name = LoadResString(20)
fnt.Size = CInt(LoadResString(21))
'设置控件的标题,对菜单项使用 caption 属性并对所有其他控件使用 Tag 属性
For Each ctl In frm.Controls
Set ctl.Font = fnt
sCtlType = TypeName(ctl)
If sCtlType = "Label" Then
ctl.Caption = LoadResString(CInt(ctl.Tag))
ElseIf sCtlType = "Menu" Then
ctl.Caption = LoadResString(CInt(ctl.Caption))
ElseIf sCtlType = "TabStrip" Then
For Each obj In ctl.Tabs
obj.Caption = LoadResString(CInt(obj.Tag))
obj.ToolTipText = LoadResString(CInt(obj.ToolTipText))
Next
ElseIf sCtlType = "Toolbar" Then
For Each obj In ctl.Buttons
obj.ToolTipText = LoadResString(CInt(obj.ToolTipText))
Next
ElseIf sCtlType = "ListView" Then
For Each obj In ctl.ColumnHeaders
obj.Text = LoadResString(CInt(obj.Tag))
Next
Else
nVal = 0
nVal = Val(ctl.Tag)
If nVal > 0 Then ctl.Caption = LoadResString(nVal)
nVal = 0
nVal = Val(ctl.ToolTipText)
If nVal > 0 Then ctl.ToolTipText = LoadResString(nVal)
End If
Next
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -