VB 窗口最大化最小化,里面的控件大小一起变化源码(经典)
(2013-06-25 23:32:08)
标签:
vb笔记vb知识vb窗口大小it |
分类: 封笔之VB笔记 |
Option Explicit
Private InitWidth As
Long
Private InitHeight As Long
Private Sub Form_Load()
InitWidth = ScaleWidth
InitHeight = ScaleHeight
Dim Ctl As Control
On Error Resume
Next
For Each Ctl In
Me
Next Ctl
On Error GoTo 0
End Sub
Private Sub Form_Resize()
Dim D(4) As Double
Dim I As Long
Dim TempPos As Long
Dim StartPos As Long
Dim Ctl As Control
Dim TempVisible As Boolean
Dim ScaleX As Double
Dim ScaleY As Double
ScaleX = ScaleWidth / InitWidth
ScaleY = ScaleHeight / InitHeight
On Error Resume Next
For Each Ctl In Me
Next Ctl
On Error GoTo 0
End Sub

加载中…