VncSharp Logo

VncSharp: Documentation

VncSharp is intended to provided .NET developers an easy way to integrate VNC functionality into their own applications. If you want to begin using VncSharp right away, start by reading the Beginners Quick Start Guide. You should also browse the API Documentation.

Because VncSharp was written primarily as a way to explore the .NET Framework, and as is intended for others who also want to explore the Framework more deeply, we have tried to document as much of the code as possible. We have also provided a brief discussion of the overall Architecture, which may be of help to those interested in reading or contributing to the code. If you plan on working with the code you should also read the RFB Protocol v 3.8 (pdf).

Building VncSharp from Source

The easiest way to build VncSharp is to use the .NET SDK command-line compiler csc. We thought about using nant or nmake for this, but since everything can be done in one (long) line, it was easier to simply write a small .bat file.

When you unzip the source archive you'll see a file Build.bat. Run this, making sure that csc is in your path.

If you'd like to experiment with VncSharp using Mono, you can use the mcs compiler in place of csc. The only change you'll need to make to the Build.bat file is to remove the final optimization switch /o. Doing so will give you a clean compile.

Initial tests using the Mono-compiled DLL are encouraging. Only design time integration breaks, but this can be overcome by manually referencing the RemoteDesktop control and creating an instance at runtime:

// create private member
private RemoteDesktop remoteDesktop1;
...

// instantiate in ctor
remoteDesktop1 = new VncSharp.RemoteDesktop();
remoteDesktop1.Dock = DockStyle.Fill;
remoteDesktop1.Location = new Point(0, 0);

this.Controls.Add(remoteDesktop1);

Compiling and Debugging VncSharp within Visual Studio.NET

If you'd like to explore or work on the code and are more comfortable using Visual Studio.NET, here are some suggestions to avoid hassles: