How to: Add Items from Server Explorer
When you drag certain resources from Server Explorer onto Visual Studio designers, the integrated development environment (IDE) automatically creates new components that reference the resources selected. For example, if you drag a message queue from Server Explorer onto a Windows project, the IDE automatically creates a MessageQueue component preconfigured to reference that particular queue. You can then write code that accesses and manipulates data from that queue through this new component.
The following table lists items that you can drag from Server Explorer, and it describes the components created when you place them onto a Visual Studio project, form, or class designer.
Items that can be dragged
Event log categories, message queues, performance counters, and services
For more information, see How to: Add New Servers in Server Explorer and Data Connections in Server Explorer/Database Explorer.
Event log categories
Individual message queues
Individual counters and instances
A ServiceController component appears, preconfigured to interact with the service selected. For more information, see Introduction to Communicating with Existing Services.
You cannot drag any data items from Server Explorer. For information on creating data components, see Connecting to Data in Visual Studio Overview, Data Source Configuration Wizard, or Data Sources Window.
You also can create blank components by dragging items from the Toolbox.
To create a new data component using the Toolbox
Select the desired component in the Toolbox.
Drag this component onto a project, form, or class.
A new, blank instance of the component is created.
Configure the properties of this new component in the Properties window or in your programming code.