Option Explicit
Private Type ControlSize
name As String '控件名称
x As Single '左边距比例
y As Single '右边距比例
cx As Single '宽度比例
cy As Single '长度比例
End Type
Dim arrSize() As ControlSize
Private Sub Form_Load()
ReDim arrSize(0) As ControlSize
SaveSize Command1
SaveSize Command2
End Sub
Private Sub Form_Resize()
If Me.WindowState = 1 Then
Exit Sub
End If
Resize Command1
Resize Command2
End Sub
Private Sub Resize(obj As Object)
Dim i As Integer
Dim j As Integer
j =
Private Type ControlSize
name As String '控件名称
x As Single '左边距比例
y As Single '右边距比例
cx As Single '宽度比例
cy As Single '长度比例
End Type
Dim arrSize() As ControlSize
Private Sub Form_Load()
ReDim arrSize(0) As ControlSize
SaveSize Command1
SaveSize Command2
End Sub
Private Sub Form_Resize()
If Me.WindowState = 1 Then
Exit Sub
End If
Resize Command1
Resize Command2
End Sub
Private Sub Resize(obj As Object)
Dim i As Integer
Dim j As Integer
j =