VncSharp Logo

VncSharp: Documentation

The following is a guide to getting started using the VncSharp RemoteDesktop control. Instructions are provided for Visual Studio.NET users as well as for those using Command-Line compilers.

You are encouraged to download the example application source, which is available in a C# version or VB.NET version. This example application demonstrates the main uses of VncSharp's RemoteDesktop control. If you are interested in more details, please consult the RemoteDesktop.cs file itself, which is well documented.

1a) Setup for Use with Visual Studio.NET

1b) Setup for Use with Command-Line Compilers (csc, mcs, etc.)

  1. You must add a run-time reference to the VncSharp.dll file by including the following switch in your compiler options: /res:\path\to\VncSharp.dll
  2. Include the VncSharp Namespace at the top of your source file by adding the code: using VncSharp;
  3. In a Windows Forms derived class, add a member variable of type VncSharp.RemoteDesktop and instantiate this object in the form's constructor.

2) Coding the RemoteDesktop Control

The best way to learn about how to code the RemoteDesktop control is to examine the example application (C# version or VB.NET version) and look at the RemoteDesktop.cs file itself. If you are interested, you can also explore the classes used by the RemoteDesktop, which handle low-level RFB protocol messages. These are useful if you wish to build an application that does something custom on top of the VNC protocol itself.