do this at the same time....(hide statusbar)
endif
anybody can help me
thanks in advance
-----------------------
vblearner
30-06-2006 at 07:24 AM
|
steve_w Level: Moderator Registered: 18-04-2003 Posts: 1156
Re: Mdi minimize,maximize
Hi vbLearner
You need to put some code into your mdi form resize event, see my example below.
Private Sub MDIForm_Resize()
On Error Resume Next
Select Case Me.WindowState
' not sure about point of this one
' cos if its minimized you won't
' see it anyway
Case vbMinimized
StatusBar1.Visible = True
Case vbNormal
StatusBar1.Visible = True
Case vbMaximized
StatusBar1.Visible = False
End Select
End Sub
Hope it helps
Steve
30-06-2006 at 11:24 AM
|
yronium Level: Moderator Registered: 14-04-2002 Posts: 907
Re: Mdi minimize,maximize
quote:steve_w wrote:
Private Sub MDIForm_Resize()
On Error Resume Next
Select Case Me.WindowState
' not sure about point of this one
' cos if its minimized you won't
' see it anyway
Case vbMinimized
StatusBar1.Visible = True
Case vbNormal
StatusBar1.Visible = True
Case vbMaximized
StatusBar1.Visible = False
End Select
End Sub
Excuse me, steve, but I wonder why someone should hide a statusbar when the form is maximized, and show it in the other cases, when there is less room or no room to show it. Anyway, I'd write it like following
Private Sub MDIForm_Resize()
On Error Resume Next
StatusBar1.Visible = Not (Me.WindowState = vbMaximized)
End Sub
Hope it helps
[Edited by yronium on 30-06-2006 at 01:09 PM GMT]
____________________________
Real Programmer can count up to 1024 on his fingers