Message 1 of 12
VB form moves down...

Not applicable
09-09-2004
12:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this form (frmOptions) with a check box (graphical displayed as a
toggle button "cmbMoreOptions") that expands my form for some more options.
But if I run the code, the whole form moves down!!!
So I tried to "copy" and "re-apply" the Top and Left values, but the Top
value is incorrect...
Does any one have any ideas???
Private Sub cmbMoreOptions_Click()
Dim OptionsTop As Double
Dim OptionsLeft As Double
OptionsTop = frmOptions.Top
OptionsLeft = frmOptions.Left
If cmbOptions.Value = 1 Then
cmbOptions.Caption = "<<<"
frmOptions.Width = frmOptions.Width + 4000
frmOptions.Top = OptionsTop
frmOptions.Left = OptionsLeft
Else
cmbOptions.Caption = ">>>"
frmOptions.Width = frmOptions.Width - 4000
frmOptions.Top = OptionsTop
frmOptions.Left = OptionsLeft
End If
End Sub