frmmain.frm
来自「快速设置屏幕分辨率,VB语言的,比较好用,我试过」· FRM 代码 · 共 68 行
FRM
68 行
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Set Screen Demo"
ClientHeight = 1755
ClientLeft = 45
ClientTop = 330
ClientWidth = 2085
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1755
ScaleWidth = 2085
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmd1024
Caption = "1024 X 768"
Height = 350
Left = 292
TabIndex = 2
Top = 1197
Width = 1500
End
Begin VB.CommandButton cmd800
Caption = "800 X 600"
Height = 350
Left = 292
TabIndex = 1
Top = 702
Width = 1500
End
Begin VB.CommandButton cmd640
Caption = "640 X 480"
Height = 350
Left = 292
TabIndex = 0
Top = 207
Width = 1500
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmd1024_Click()
SetDisplayMode& 1024, 768, 16
Call CenterForm
End Sub
Private Sub cmd640_Click()
SetDisplayMode& 640, 480, 16
Call CenterForm
End Sub
Private Sub cmd800_Click()
SetDisplayMode& 800, 600, 16
Call CenterForm
End Sub
Private Sub CenterForm()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?