Thanks Marston.I wrote the following code to resize of the form, but
that's not working. Can you tell me where am I going wrong in the code.
Private Sub InputPanel_EnabledChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles InputPanel.EnabledChanged
Me.Panel1.Top = -Me.VScrollBar1.Value
Const NO_OF_PAGES = 1
' Define the size of the scrollbar
If (InputPanel1.Enabled = True) Then
' Set size of scrollbar
VScrollBar1.Height = SB_HEIGHT_SIP
VScrollBar1.Maximum = Panel1.Height - SB_HEIGHT_SIP
Else
VScrollBar1.Height = SB_HEIGHT_NOSIP
VScrollBar1.Maximum = Panel1.Height - SB_HEIGHT_NOSIP
VScrollBar1.LargeChange = (VScrollBar1.Maximum /
(NO_OF_PAGES - 1)) + 1
VScrollBar1.Maximum = VScrollBar1.LargeChange * NO_OF_PAGES
- NO_OF_PAGES
Panel1.Top = -VScrollBar1.Value
End If
VScrollBar1.Minimum = 0
VScrollBar1.SmallChange = VScrollBar1.Maximum / 100
VScrollBar1.LargeChange = VScrollBar1.Maximum / 10
Call setupScrollBar()
End Sub
Whiz