全屏代码是什么,全屏代码如何实现?

Excel vba 窗体编辑中,有时候需要做全屏幕效果,这是个很好的想法,我们用几行简单代码即可实现 。
全屏效果
全屏代码
Private Declare Function GetSystemMetrics Lib \"user32\" (ByVal nIndex As Long) As Long
Const SM_CXSCREEN As Long = 0
Const SM_CYSCREEN As Long = 1

全屏代码是什么,全屏代码如何实现?

文章插图
With Me
.Height = GetSystemMetrics(SM_CYSCREEN) * 0.75
.Width = GetSystemMetrics(SM_CXSCREEN) * 0.75
.Left = 0
.Top = 0
End With

全屏代码是什么,全屏代码如何实现?

文章插图
With Me.Label1
.Top = 100
.Left = 0
.Height = .Parent.Height
.Width = .Parent.Width
.Font.Size = 200
.Font.Name = \"微软雅黑\"
.Caption = \"全屏效果\"
.ForeColor = RGB(201, 122, 21)
.TextAlign = fmTextAlignCenter
.BackStyle = fmBackStyleTransparents
End With
With Me.Label2
.Top = 102
.Left = 15
.Height = .Parent.Height
.Width = .Parent.Width
.Font.Size = 200
.Font.Name = \"微软雅黑\"
.Caption = \"全屏效果\"
.ForeColor = RGB(211, 152, 211)
.TextAlign = fmTextAlignCenter
.BackStyle = fmBackStyleTransparent
End With
With Me.Label3
.Top = 0
.Left = 0
.Height = 50
.Width = 100
.Font.Size = 20
.Font.Name = \"微软雅黑\"
.Caption = \"头条.江觅\"
.ForeColor = RGB(211, 212, 211)
.TextAlign = fmTextAlignCenter
.BackStyle = fmBackStyleTransparent
End With
保存按F5运行,全屏效果还是不错的 。马上收藏,备用 。
【全屏代码是什么,全屏代码如何实现?】 好了,这篇文章的内容蜀川号就和大家分享到这里!