This documentation is archived and is not being maintained.

Dragging and Dropping Text

You can select text and then drag and drop it in another location. You can drag it to several different places:

  • A different location in the current Code Editor.
  • Another Code Editor.
  • The Command and Watch windows.
  • The Windows Recycle Bin.
  • The Visual Studio Toolbox to save snippets of code for copying into other documents later.

To drag and drop text

  1. Select the text you want to move, either with the mouse or with the keyboard.
  2. Left-click with the mouse cursor on the highlighted text and continue holding down the mouse button.
  3. Move the mouse cursor to the destination where you want to place the text.
  4. Release the mouse button to drop the text.

Dragging text moves it; that is, the text is erased from the old location and moved to the new location. CTRL+ dragging text copies it to the new location.

You can drag text into any tab under the Toolbox (except the Clipboard Ring), and then later either drag the text back or double-click its button in the ToolBox button to paste it.

Toggle drag-and-drop text editing by first selecting Options from the Tools menu. On the General tab, select Text Editor and then select Drag Drop Text.

See Also

Editing Code, HTML, and Text | Changing and Selecting Text | Navigating Code and Text