Copy Example Code from Help
Sometimes you may want to copy a useful example from Visual Basic Help. While many of the examples require more code to work correctly, some examples are useful to see how a particularor control flow technique behaves.
To copy example code from Help to your application
- Use Help to display the topic for the language element whose example you want to use.
- Click the Example link in the non-scrolling region near the top of the page. The code example is displayed.
- Right-click and select the part of the code you want to copy to your application. On the Macintosh, choose Copy from the Edit menu; a window appears in which you can select the code to copy.
- Choose Copy from the shortcut menu. On the Macintosh, press the Copy button.
- Move the focus back to the Code window and position the mouse pointer where you want the code example to be inserted.
- Right-click again and choose Paste to insert the code example into the Code window.
You can also press CTRL+C to copy a selected example in a Help window. Press CTRL+V to paste the example into the Code window.