vb
Private Sub ToolStrip1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStrip1.VisibleChanged
If Me.ToolStrip1.Visible Then
' Tool Strip is visible so attach to bottom of toolstrip
Me.WebBrowser2.Top = Me.ToolStrip1.Bottom
Me.WebBrowser2.Height -= Me.ToolStrip1.Height
Else
' Tool Strip is not visible so attach top to top of form
Me.WebBrowser2.Top = Me.TabPage1.Bottom
Me.WebBrowser2.Height += Me.ToolStrip1.Height
End If
End Sub
[/quote]
the height changing code works great but the thing is it changes the height from both the bottom and the top....so when the program default starts the webbrowser is not the proper height...also the Me.WebBrowser2.Top = Me.TabPage1.Bottom and Me.WebBrowser2.Top = Me.ToolStrip1.Bottom do not seem to work??
sorry i forget to add this......here is my slightly altered code
CODE
If Me.ToolStrip4.Visible = False Then
Me.WebBrowser2.Top = Me.TabPage1.Top
Me.WebBrowser2.Height += Me.ToolStrip4.Height And Me.ToolStrip6.Height
Else
If ToolStrip4.Visible = True Then
Me.WebBrowser2.Height -= Me.ToolStrip4.Height And Me.ToolStrip6.Height
Me.WebBrowser2.Top = Me.ToolStrip4.Bottom
End If
End If