frmview.frm
来自「很好! 很实用! 免费!」· FRM 代码 · 共 156 行
FRM
156 行
VERSION 5.00
Begin VB.Form frmView
Caption = "视图设置..."
ClientHeight = 3195
ClientLeft = 2775
ClientTop = 3765
ClientWidth = 6030
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 6030
Begin VB.Frame FrameButton
Caption = "按钮文字"
Height = 1095
Left = 120
TabIndex = 6
Top = 1920
Width = 4455
Begin VB.OptionButton opButton2
Caption = "按钮右边横排"
Height = 255
Left = 2760
TabIndex = 8
Top = 480
Width = 1455
End
Begin VB.OptionButton opButton1
Caption = "按钮下方横排"
Height = 195
Left = 360
TabIndex = 7
Top = 480
Width = 1455
End
End
Begin VB.Frame FrameViewOption
Caption = "视图"
Height = 1335
Left = 120
TabIndex = 2
Top = 240
Width = 4455
Begin VB.CheckBox ckViewToolBar
Caption = "工具条"
Height = 255
Left = 1800
TabIndex = 5
Top = 600
Width = 855
End
Begin VB.CheckBox ckViewStatusBar
Caption = "状态栏"
Height = 255
Left = 3240
TabIndex = 4
Top = 600
Width = 855
End
Begin VB.CheckBox ckViewLeftTree
Caption = "菜单树"
Height = 255
Left = 240
TabIndex = 3
Top = 600
Width = 855
End
End
Begin VB.CommandButton cmdExit
Caption = "关 闭"
Height = 375
Left = 4680
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.CommandButton cmdOK
Caption = "确 定"
Height = 375
Left = 4680
TabIndex = 0
Top = 240
Width = 1215
End
End
Attribute VB_Name = "frmView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Dim lngWindowPosition As Long
Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub ckViewLeftTree_Click()
MDIForm1.picLeft.Visible = ckViewLeftTree.value
MDIForm1.picLeft.Width = 2010
End Sub
Private Sub ckViewStatusBar_Click()
MDIForm1.bottomStatusBar.Visible = ckViewStatusBar.value
End Sub
Private Sub ckViewToolBar_Click()
MDIForm1.picTop.Visible = ckViewToolBar.value
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
g_MenuTree = ckViewLeftTree.value
g_ToolBar = ckViewToolBar.value
g_StatusBar = ckViewStatusBar.value
g_ButtonArrange = opButton1.value 'if opButton1.value=true then opButton2.value=false else opButton2.value=true end if
MDIForm1.picLeft.Visible = g_MenuTree
MDIForm1.picTop.Visible = g_ToolBar
MDIForm1.bottomStatusBar.Visible = g_StatusBar
Unload Me
End Sub
Private Sub Form_Load()
lngWindowPosition = SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
If g_ButtonArrange Then
opButton1.value = True
Else
opButton2.value = True
End If
If g_MenuTree Then
ckViewLeftTree.value = 1
Else
ckViewLeftTree.value = 0
End If
If g_ToolBar Then
ckViewToolBar.value = 1
Else
ckViewToolBar.value = 0
End If
If g_StatusBar Then
ckViewStatusBar.value = 1
Else
ckViewStatusBar.value = 0
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?