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.
Event log categories
An EventLog component appears, pointing to the category selected.
Individual message queues
A MessageQueue component appears, pointing to the queue selected.
Individual counters and instances
A PerformanceCounter component appears, pointing to the counter (and instance) selected.
A ServiceController component appears, preconfigured to interact with the service selected.
You cannot drag any data items from Server Explorer. For information on creating data components, see Connecting to Data in Windows Forms Applications, 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.