Article ID: 187562
Article Last Modified on 7/1/2004
Private Sub Form_Resize()
Dim Ctl As Control, CtlCln As New Collection
On Error Resume Next
For Each Ctl In Controls
If Ctl.Left < 0 Then CtlCln.Add Ctl
Next
SSTab1.Visible = False
' Put the code here to resize the controls
For Each Ctl In CtlCln
If Ctl.Left > 0 Then Ctl.Left = Ctl.Left - 75000
Next
SSTab1.Visible = True
End Sub
Private Sub Form_Resize()
SSTab1.Move 0.1 * ScaleWidth, 0.1 * ScaleHeight, _
0.8 * ScaleWidth, 0.8 * ScaleHeight
Command1.Move 0.2 * SSTab1.Width, 0.2 * SSTab1.Height, _
0.4 * SSTab1.Width, 0.4 * SSTab1.Height
Text1.Move 0.4 * SSTab1.Width, 0.4 * SSTab1.Height, _
0.4 * SSTab1.Width, 0.4 * SSTab1.Height
' NOTE: The Height property cannot be changed for the DriveListBox
' control or for the ComboBox control, whose Style property setting
' is 0 (Dropdown Combo) or 2 (Dropdown List). See the REFERENCES
' section for an article that discusses how to resize a ComboBox.
End Sub
Private Sub Form_Resize()
Dim Ctl As Control, CtlCln As New Collection
On Error Resume Next
For Each Ctl In Controls
If Ctl.Left < 0 Then CtlCln.Add Ctl
Next
SSTab1.Visible = False
' Add the code to resize the controls:
SSTab1.Move 0.1 * ScaleWidth, 0.1 * ScaleHeight, _
0.8 * ScaleWidth, 0.8 * ScaleHeight
Command1.Move 0.2 * SSTab1.Width, 0.2 * SSTab1.Height, _
0.4 * SSTab1.Width, 0.4 * SSTab1.Height
Text1.Move 0.4 * SSTab1.Width, 0.4 * SSTab1.Height, _
0.4 * SSTab1.Width, 0.4 * SSTab1.Height
' NOTE: The Height property can't be changed for the DriveListBox
' control or for the ComboBox control, whose Style property setting
' is 0 (Dropdown Combo) or 2 (Dropdown List). See the REFERENCES
' section for an article that discusses how to resize a ComboBox.
For Each Ctl In CtlCln
If Ctl.Left > 0 Then Ctl.Left = Ctl.Left - 75000
Next
SSTab1.Visible = True
End Sub
182070 : How To Create a Resolution-Independent Form
Additional query words: visible top tabctl32.ocx kbDSupport kbDSD kbVBp500 kbCtrl kbUsage kbVBp600
Keywords: kbhowto kbgrpdsvb KB187562