Export (0) Print
Expand All

Text Editor Window

Visual Studio 6.0

   

A window where you write, display, and edit code. You can open as many Text Editor windows as you have modules, so you can easily view the code in different forms or modules, and copy and paste among them. The Text Editor window is also known as the Code Editor window.

You can open a Text Editor window from:

  • The Project Explorer window, by selecting a form or module, and choosing the View Code button, , or by double clicking the form or module.

  • A Form window, by right-clicking a control or form and choosing View Code or by choosing Code from the View menu.

  • The File menu, by choosing the Open File command.

CAUTION   If you share files with other users at other sites that use distinct codepages, you should save your file in Unicode to prevent problems.

Editor Features

Drag-and-Drop Text Editing

You can drag selected text and drop it to another location. The locations to which you can drag it are:

  • A different location in the current Text Editor window.

  • Another Text Editor window.

  • The Immediate and Watch windows.

You can turn drag-and-drop text editing on or off by selecting Drag Drop Text Editing from the General options of the Text Editor page of the Options dialog box.

Selection Modes

The Text Editor window has two modes:

  • Stream mode, which is similar to the standard Microsoft Windows multiline edit control. Selection is a one-dimensional stream from the start of the file to the end.

  • Box mode, where full lines or "boxes" of code are selected. A box includes any character that intersects with the rectangle defined by the beginning character (anchor character) and the last character in the selection. You can toggle between Stream and Box mode by holding CTRL and pressing R and then S.

You can change the mode in the Per Language option of the Text Editor page of the Options dialog box. To change the mode for all of your editors, select Per Language. If you want to change the mode for a specific editor, click plus (+) and then select the type of editor before changing the option.

Virtual Space Mode

In Virtual Space mode, the text editor behaves as if the space past the end of each line is filled with an infinite number of spaces.

Note   Virtual Space mode is on whenever you are in Box mode.

Use with Source Code Control

When you open a file that is under source code control, you are asked if you want to check it out.

If the file is under source code control, the file title is displayed with [Read only] in the window's caption. If you try to save the file, the Save As dialog appears so you can save it with a different name or in a different location.

Working with Undo and Redo Commands

The editor allows you to have unlimited multilevel undo and redo actions per document.

To include the insertion point movements in the Undo list, you can select the option from the General Options of the Text Editor page of the Options dialog box.

Displaying and Linking URLs (Uniform Resource Locators)

You can create URLs within your code. By default the URLs:

  • Appear underlined

  • Change the mouse pointer when you move over them.

  • Open the URL site if the URL is valid.

To change the way you display and link URLs for all of your editors, select the Per Language option of the Text Editor page of the Options dialog box. If you want to change the display and linking of URLs for a specific editor, click plus (+) and then select the type of editor before changing the option.

However, you can still open a valid Internet site by choosing the Open URL command from the Text Editor shortcut menu.

Customized Fonts and Colors

You can customize the way the text appears in the editor. For specified items, you can change the:

  • Background and foreground colors

  • Type and size of fonts

To change the way colors and fonts appear in your editor, select the Font and Color option of the Text Editor page of the Options dialog box.

Elements

Code Pane

The area where you type your code. Contains the statement builder features available for your product.

Note   Not all of the features listed may be available for the application you are using.

Using the General options of the Text Editor page of the Options dialog box, you can also set options that:

  • Allow you to use and set a clickwait time. Setting a clickwait time allows you to move the focus from one window to another without moving the insertion point in the target window, if you press the mouse button for less than the amount of time you set.

  • Move the insertion point to the beginning or end of the selection, based on where the insertion point was when you selected the text after you press ESC.

  • Place the insertion point at the beginning of the selection when you paste it from the Clipboard.

You can also vary the type and size of indenting and tabs in your code from the Tabs options of the Text Editor page of the Options dialog box. You can set the tabs for all of the text editors in the development environment with the Tabs option or for a specific editor.

Margin Indicator Bar

A gray area on the left side of the Text Editor window where margin indicators such as breakpoints, bookmarks, and shortcuts are displayed.

You can hide or display the Margin Indicator bar from the General Options of the Text Editor page of the Options dialog box.

Selection Margin

The white space immediately to the left of the code text where can click to select lines of text.

You can hide or display the Selection Margin from the General Options of the Text Editor page of the Options dialog box.

Horizontal and Vertical Scroll Bars

Allows you to scroll the Code pane horizontally and vertically so that you can view the code that extends beyond the edges of the Code pane.

You can hide or display the horizontal and vertical scroll bars from the General Options of the Text Editor page of the Options dialog box.

Show:
© 2014 Microsoft