Moving and Resizing the Programming Tools


Moving and Resizing the Programming Tools

With numerous programming tools to contend with on the screen, the Visual Studio IDE can become a pretty busy place. To give you complete control over the shape and size of the elements in the development environment, Visual Studio lets you move, resize, dock, and auto hide most of the interface elements that you use to build programs.

To move one of the tool windows in Visual Studio, simply click the title bar and drag the object to a new location. If you align one window along the edge of another window, it attaches to that window, or docks itself. Dockable windows are advantageous because they always remain visible. (They don't become hidden behind other windows.) If you want to see more of a docked window, simply drag one of its borders to view more content.

If you want to completely close a window, click the Close button in the upper-right corner of the window. You can always open the window again later by clicking the appropriate command on the View menu.

If you want an option somewhere between docking and closing a window, you might try auto hiding a tool window at the side of the Visual Studio IDE by clicking the tiny Auto Hide pushpin button on the right side of the tool's title bar. This action removes the window from the docked position and places the title of the tool at the edge of the development environment in an unobtrusive tab. When you auto hide a window, you'll notice that the tool window remains visible as long as you keep the mouse pointer in the area of the window. When you move the mouse to another part of the IDE, the window slides out of view.

To restore a window that you have auto hidden, click the tool tab at the edge of the development environment or hold your mouse over the tab. (You can recognize a window that is auto hidden because the pushpin in its title bar is pointing sideways.) By holding the mouse pointer over the title, you can use the tools in what I call “peek-a-boo” mode—in other words, to quickly display an auto hidden window, click its tab, check or set the information you need, and then move the mouse to make the window disappear. If you ever need the tool displayed permanently, click the Auto Hide pushpin button again so that the point of the pushpin faces down, and the window then remains visible.

An exciting capability of Visual Studio 2005 is the ability to display windows as tabbed documents (windows with tab handles that partially hide behind other windows) and to dock windows by using docking guides, as shown in the following illustration.

graphic

Docking guides are changeable icons that appear on the surface of the IDE when you move a window or tool from a docked position to a new location. Because the docking guides are associated with shaded, rectangular areas of the IDE, you can preview the results of your docking maneuver before you actually make it. In my opinion, this fixes a major problem with previous versions of the Visual Studio IDE, which had impressive collections of development tools that were cumbersome to customize.

Docking and auto hiding techniques definitely take some practice to master. Use the following exercises to hone your windows management skills and experiment with the features of the Visual Studio development environment. After you complete the exercises here, feel free to configure the Visual Studio tools in a way that seems comfortable for you.

Moving and Resizing Tool Windows

To move and resize one of the programming tool windows in Visual Studio, follow these steps. This exercise demonstrates how to manipulate the Properties window, but you can work with a different tool window if you want to.

Move and resize the Properties window

  1. If the Properties window isn't visible in the development environment, click the Properties Window button on the Standard toolbar.

    The Properties window is activated in the IDE, and its title bar is highlighted.

  2. Double-click the Properties window title bar to display the window as a floating (nondocked) window.

  3. Using the Properties window title bar, drag the window to a new location in the development environment, but don't dock it (yet).

    Moving windows around the Visual Studio IDE gives you some flexibility with the tools and the look of your development environment.

    Now you'll resize the Properties window to see more object property settings at once.

  4. Move the mouse to the lower-right corner of the Properties window until it becomes a resizing pointer.

  5. Drag the lower-right border of the window down and to the right to enlarge the window.

    Your Properties window is now bigger:

    graphic

    You can work more quickly and with more clarity of purpose in a bigger window. Feel free to move or resize a window when you need to see more of it.

Docking Tool Windows

If a tool window is floating over the development environment, you can return it to its original docked position by double-clicking the window's title bar. (Notice that you used this same technique in the previous exercise to expand a docked window. Double-clicking a title bar works like a toggle, a state that switches back and forth between two standard positions.) You can also attach or dock a floating tool in a different place. You might want to do this if you need to make more room in Visual Studio for a particular programming task, such as creating a user interface with the Designer. Try docking the Properties window in a different location now.

Dock the Properties window

  1. Verify that the Properties window (or another tool that you want to dock) is floating over the Visual Studio IDE in an undocked position.

    If you completed the previous exercise, the Properties window is undocked now.

  2. Drag the title bar of the Properties window to the top, bottom, right, or left edge of the development environment (your choice!), taking care to drag the mouse pointer over one of the docking guides (small arrows) on the edge of the Visual Studio IDE, or the collection of four docking guides in the center.

    As you move the mouse over a docking guide, the Properties window snaps into place, and a blue shaded rectangle indicates how your window will appear when you release the mouse button. Note that there are several valid docking locations for tool windows in Visual Studio, so you might want to try two or three different spots until you find one that looks right to you. (A window should be located in a place that's handy and not in the way of other needed tools.)

    graphic

  3. Release the mouse button to dock the Properties window.

    The window snaps into place in its new home.

    TIP
    To switch between dockable, tabbed document, and floating window styles, right-click the window's title bar (or tab, if it is a tabbed document), and select the option that you want to use. Although the Properties window works very well as a dockable window, you'll probably find that larger windows (the Visual Studio Start Page, for example) work best as tabbed document windows.

  4. Try docking the Properties window several more times in different places to get the hang of how docking works.

    I guarantee that although a few of these window procedures seem confusing at first, after a while they'll become routine for you. In general, you want to create window spaces that have enough room for the information you need to see and use while you work on more important tasks in the Designer and in the Code Editor.

Hiding Tool Windows

To hide a tool window, click the Auto Hide pushpin button on the right side of the title bar to conceal the window beneath a tool tab on the edge of the IDE, and click it again to restore the window to its docked position. You can also use the Auto Hide command on the Window menu (or right-click a title bar and select Auto Hide) to auto hide a tool window. Give it a try now.

Use the auto hide feature

  1. Locate the Auto Hide pushpin button on the title bar of the Properties window.

    The pushpin is currently in the “down,” or “pushed in,” position, meaning that the Properties window is “pinned” open and auto hide is disabled.

  2. Click the pushpin button in the Properties window title bar.

    The Properties window slides off the screen and is replaced by a small tab named Properties. The benefit of enabling auto hide, of course, is that the process frees up additional work area in Visual Studio. But the hidden window is also quickly accessible.

  3. Hold the mouse pointer over the Properties tab. (You can also click the Properties tab if you want.)

    The Properties window immediately slides back into view.

  4. Click elsewhere within the IDE, and the window disappears again.

  5. Finally, display the Properties window again, and then click the pushpin button on the Properties window title bar.

    The Properties window returns to its familiar docked position, and you can use it without worrying about it sliding away.

    Spend some time moving, resizing, docking, and auto hiding tool windows in Visual Studio now, to create your version of the perfect work environment. As you work through this book, you'll want to adjust your window settings periodically to adapt your work area to the new tools you're using. When the need arises, come back to this section and practice your skills again.

TIP
Visual Studio 2005 now lets you save your window and programming environment settings and copy them to a second computer or share them with members of your programming team. To experiment with this new feature, click the Import/Export Settings command on the Tools menu and follow the wizard instructions to export (save) or import (load) settings from a file.



Microsoft Visual Basic 2005 Step by Step
Microsoft Visual Basic 2005 Step by Step (Step by Step (Microsoft))
ISBN: B003E7EV06
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net