Surendra Sharma

Surendra Sharma

Search This Blog

Tuesday, August 20, 2013

Windows… Option - Secrets of Visual Studio


Least known but yet most powerful facility of Visual Studio is Windows… option.

What is Windows…?

Suppose you have 8 windows or forms opened in Visual Studio as below
·         TestPage1.aspx
·         TestPage2.aspx
·         TestPage3.aspx
·         TestPage4.aspx
·         TestPage1.aspx.cs
·         TestPage2.aspx.cs
·         TestPage3.aspx.cs
·         TestPage4.aspx.cs



Now how can you close only some of the forms?

Way 1:-
Close each form one by one by right click on form tab and select Close as below


Way 2:-
Close all opened forms except only selected form by right click on any one form tab and select Close All But This as below


Way 3:-
Close all opened forms from menu Window -> Close All Documents as below


Way 4:-
From ours all 8 opened forms suppose I want only 3 forms should be opened and rest should be closed.

Below forms should be opened
·         TestPage1.aspx
·         TestPage2.aspx
·         TestPage4.aspx.cs

Below forms should be closed

·         TestPage3.aspx
·         TestPage4.aspx
·         TestPage1.aspx.cs
·         TestPage2.aspx.cs
·         TestPage3.aspx.cs

Visual Studio provides to achieve this from its Window… option
This option is available in menu Window -> Windows…  [Last menu item]


On Click on Windows… item, a window should appear

Now select the forms and click on “Close Window(s)”.


All selected forms should be closed.

Also you can activate any forms from Windows… option. Just select any form and click on Activate as below


Your form should appear as selected form in Visual Studio IDE.



Please leave your comments or share this tip if it’s useful for you.

No comments:

Post a Comment