i work with 3 more form. 2 form has no border. when i click a button a form is show. when i minimize main form the other form still show. but i want when i minimized main form all from will minimize what was open.

8 Years
Discussion Span
Last Post by Qesha carol

Form has WindowState Property.
The values may be
vbNormal - 0 - (Default) Normal.
vbMinimized - 1 - Minimized (minimized to an icon)
vbMaximized - 2 - Maximized (enlarged to maximum size)

But Form does not have any particular Event occur when minimize and maximize.

Resize() event can be useful
To do
> Check whether the form is already minimized or not
> Change the State to Minimized


Private Sub Form_Resize()
   If Form1.WindowState = vbMinimized Then
      OtherForm.WindowState = vbMinimized
   End If
   If Form1.WindowState = vbNormal Then
      OtherForm.WindowState = vbNormal
   End If
End Sub

but when it normal then form1 appear. I want otherForm will appear. Now it appear in the back of Form1.


Hello abu tahir
'if you want to minimize other forms but form1 cannot minimize so
'try this:
'if you will use 3 or 4 forms see it

Private Sub Command1_Click()
Form2.WindowState = 1
Form3.WindowState = 1
Form4.WindowState = 1
End Sub

Private Sub Form_Load()

End Sub

' if show your all forms then you press command botton your all forms are minmized


not like this. supoose.... in FrmMain I click a button show FrmItem (another form). It was show. When I minmize FrmMain it was minimized with FrmItem. When I maximized FrmMain FrmItem not show in front. It show In back of FrmMain. I want it will show on front of FrmMain.


it show a error massage:
run time error 5
Invalid proceduer call or argument.


i work a program that uses two pc and then connect them..
how can i minimize all the windows that i open ?
Example: someone was Surfing on the net and then he want to stop the time . i click the button so that all windows will be minimize, and only desktop currently shown.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.