Visual Basic Server Component Samples

These samples demonstrate some common tasks that you can accomplish by using components.

To access samples from Visual Studio

  1. On the Help menu, click Samples.

  2. In the Samples on Disk section of the readme file, click local Samples folder. By default, the samples are installed in drive:\Program Files\Microsoft Visual Studio 10.0\Samples\1033 or drive:\Program Files (x86)\Microsoft Visual Studio 10.0\Samples\1033.

  3. Right-click the .zip file that contains the samples you want to open and then click Extract All to extract the samples to a folder of your choice.

For the most current samples, go to the Visual Basic Samples Web site.

Security noteSecurity Note

Microsoft provides the included samples "AS IS" with no warranties. The code in the samples is provided just to illustrate concepts. The provided code may not meet security requirements for any specific environment. We recommend that you add security and error-handling code to your projects to make them as secure and robust as you deem appropriate.




COM Port Sample

Demonstrates how to control a communications (COM) port.

Event Log Sample

Demonstrates how to create and delete event logs and how to read from and write to system event logs and custom event logs by using the EventLog component and the My.Application.Log object.

Message Queue Sample

Shows how to send and receive message-queue messages from Windows Forms applications.

Performance Counters Sample

Shows how to read from and write to performance counters to track the performance of the operating system and .NET Framework applications.

Process Control Sample

Illustrates some of the ways to start and monitor processes by using the Process class of the System.Diagnostics namespace. It consists of two projects: ProcessClass and ProcessViewer.

Service Manager Sample

Shows how to control Windows Services by using the System.ServiceProcess namespace.

WMI Sample

Demonstrates how to use objects in the System.Management namespace to access Windows Management Instrumentation (WMI) and to query system information such as operating system name, version, manufacturer, and computer name.

See Also





Other Resources

Visual Studio 2010 Samples

Visual Basic Sample Applications