Option Explicit Private Type XD相对大小 X1 As Single X2 As Single Y1 As Single Y2 As Single FontSize As Single End Type Dim XD() As XD相对大小 Private Sub Form_Load() On Error Resume Next Dim II%, C As Control For Each C In Me.Controls ReDim Preserve XD(II) XD(II).X1 = C.Left / Me.ScaleWidth XD(II).Y1 = C.Top / Me.ScaleHeight XD(II).X2 = C.Width / Me.ScaleWidth XD(II).Y2 = C.Height / Me.ScaleHeight XD(II).FontSize = C.Font.Size / Sqr(Me.ScaleWidth ^ 2 + Me.ScaleHeight ^ 2) II = II + 1 Next End Sub Private Sub Form_Resize() On Error Resume Next Dim II%, C As Control With Me For Each C In .Controls C.Left = XD(II).X1 * .ScaleWidth C.Top = XD(II).Y1 * .ScaleHeight C.Width = XD(II).X2 * .ScaleWidth C.Height = XD(II).Y2 * .ScaleHeight C.Font.Size = XD(II).FontSize * Sqr(Me.ScaleWidth ^ 2 + .ScaleHeight ^ 2) II = II + 1 Next End With End Sub '注意!组合框和驱动器列表框的Height只读。