📄 module2.bas
字号:
Attribute VB_Name = "Module1"
Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Sub DO_skin(FRM As Form)
On Error Resume Next
With FRM
.TOPLEFT.Move .ScaleLeft, .ScaleTop
.TOPRIGHT.Move .ScaleWidth - .TOPRIGHT.Width, .ScaleTop
.TOPMID.Move .TOPLEFT.Width, .ScaleTop, .ScaleWidth - .TOPLEFT.Width - .TOPRIGHT.Width, .TOPLEFT.Height
.LEFTTOP.Move .ScaleLeft, .ScaleTop + .TOPLEFT.Height
.LEFTBOT.Move .ScaleLeft, .ScaleHeight - .LEFTBOT.Height
.LEFTMID.Move .ScaleLeft, .ScaleTop + .TOPLEFT.Height + .LEFTTOP.Height, .LEFTTOP.Width, .ScaleHeight - .TOPLEFT.Height - .LEFTTOP.Height - .LEFTBOT.Height
.RIGHTMID.Width = .RIGHTTOP.Width
.RIGHTTOP.Move .ScaleWidth - .RIGHTTOP.Width, .ScaleTop + .TOPLEFT.Height
.RIGHTBOT.Move .ScaleWidth - .RIGHTBOT.Width, .ScaleHeight - .RIGHTBOT.Height
.RIGHTMID.Move .ScaleWidth - .RIGHTMID.Width, .ScaleTop + .TOPLEFT.Height + .RIGHTTOP.Height, .RIGHTTOP.Width, .ScaleHeight - .TOPLEFT.Height - .RIGHTTOP.Height - .RIGHTBOT.Height
.BOT.Move .LEFTBOT.Width, .ScaleHeight - .BOT.Height, .ScaleWidth - .LEFTBOT.Width - .RIGHTBOT.Width, .LEFTBOT.Height
.CLOSEBOX.Move .ScaleWidth - .CLOSEBOX.Width - CInt(FRMMAIN.TXTRIGHT), CInt(FRMMAIN.TXTTOP)
.MAXRESBOX.Move .CLOSEBOX.Left - CInt(FRMMAIN.TXTGAP) - .MAXRESBOX.Width, CInt(FRMMAIN.TXTTOP)
.MINBOX.Move .MAXRESBOX.Left - CInt(FRMMAIN.TXTGAP) - .MINBOX.Width, CInt(FRMMAIN.TXTTOP)
.ONTOPBOX.Move .MINBOX.Left - CInt(FRMMAIN.TXTGAP) - .ONTOPBOX.Width, CInt(FRMMAIN.TXTTOP)
.Label1.Move CInt(FRMMAIN.TXTCLEFT) + 18, CInt(FRMMAIN.TXTCTOP) + 1 '+18还有+3都是后来加的,为了预览真实些
.Label2.Move CInt(FRMMAIN.TXTCLEFT) + 17, CInt(FRMMAIN.TXTCTOP) '+17还有+2都是后来加的,为了预览真实些
.Image1.Move CInt(FRMMAIN.TXTCLEFT2), CInt(FRMMAIN.TXTCTOP) + 1
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -