Using Visual Basic .NET to Manipulate Your Windows

Visual Basic .NET gives you three ways to display windows on the screen.



  • Floating: Windows appear like disembodied heads that can appear anywhere on the screen.

  • Dockable: Windows appear smashed along the top, bottom, or sides of the screen.

  • Auto hide: Windows automatically tuck themselves out of view as soon as you move the mouse pointer off the window.

Making a floating window


To turn any window into a floating window, follow these steps:



1. Open the window you want to view by choosing View and then the window name (such as Properties Window or Solution Explorer).


Your chosen window appears.


2. Move the mouse pointer over the title bar of the window, hold down the left mouse button, and drag the mouse to the middle of the screen.


Visual Basic .NET displays the gray outlines of your window so you can see its position on the screen.


3. Release the left mouse button.


Congratulations! You've just created a floating window.


If you double-click on the title bar of a floating window, you can instantly dock it to one side of the screen.



Creating a dockable window


To turn any window into a dockable window, follow these steps:



1. Open the window you want to view by choosing View and then the window name (such as Solution Explorer or Toolbox).


Your chosen window appears.


2. Move the mouse pointer over the title bar of the window, hold down the left mouse button, and drag the mouse to any side of the screen.


Visual Basic .NET displays the gray outlines of your window so you can see its position on the screen.


3. Release the left mouse button when the gray outline of the window appears to "snap" into place.


You've just created a dockable window.


If you double-click on the title bar of a dockable window, you can turn it into a floating window that appears in the middle of the screen.



Auto hiding a window


Auto hiding temporarily tucks a window out of sight and displays the window as a tab that appears on one side of the screen. When you want to view the window, move the mouse over the tab and Visual Basic .NET magically "slides" your window from the side and in full view so you can see it again.



To auto hide a window, follow these steps:



1. Follow Steps 1 and 2 in the previous section, "Making a dockable window."


When your chosen window appears docked to one side of the screen, the Auto Hide (a pushpin) icon appears in the window's upper-right corner.


2. Click on the Auto Hide icon.


Visual Basic .NET displays your window as a tab on one side of the screen.


3. Move the mouse pointer over this tab to display your window at any time.


You can auto hide all your dockable windows (but not floating windows) simply by choosing Window --> Auto Hide All.



Closing a window


Whenever you want to close a window completely, click on its Close box.



Quitting Visual Basic .NET


No matter how much you may love using Visual Basic .NET, eventually you need to turn off the computer and go to sleep (or at least pass out on the keyboard for an hour or two). To exit Visual Basic .NET, use one of these three methods:



  • Choose File --> Exit.

  • Press Alt+F4.

  • Click on the Close box of the Visual Basic .NET user interface window.

If you haven't saved the currently displayed Visual Basic .NET program, Visual Basic .NET displays a dialog box, giving you one last chance to save your work before your work is gone for good. Just click on Yes to save your work (or No to lose any changes you have made since the last time you saved the file).



As long as your computer hasn't crashed, Visual Basic .NET smoothly exits and dumps you back to the Windows desktop.










dummies

Source:http://www.dummies.com/how-to/content/using-visual-basic-net-to-manipulate-your-windows.html

No comments:

Post a Comment