Resizing Controls at run-time
Resizing Controls at run-time
API Declarations
Private lPrevHeight As Long
Rate Resizing Controls at run-time
(1(1 Vote))
Private Sub Form_Resize()
Dim lLenTemp As Long
If lPrevWidth > 0 And lPrevHeight > 0 Then
' Checking Width property
lLenTemp = Label1.Width + (Me.Width - lPrevWidth)
If lLenTemp > 0 And lLenTemp <> Label1.Width Then
Label1.Width = lLenTemp
End If
' Checking Height property
lLenTemp = Label1.Height + (Me.Height - lPrevHeight)
If lLenTemp > 0 And lLenTemp <> Label1.Height Then
Label1.Height = lLenTemp
End If
End If
lPrevWidth = Me.Width
lPrevHeight = Me.Height
End Sub
Resizing Controls at run-time Comments
No comments yet — be the first to post one!
Post a Comment