skip to the main content area of this page
Developer Resources - Example Code and API Reference

Code Examples

Click here to view or download the API reference.

Using Easy GIS .NET in your own Desktop Applications

While Easy GIS .NET Desktop Edition is a powerful GIS application on its own, its true power lies in the componentized design and ease by which developers can add the Easy GIS .NET controls to their own Windows desktop applications.

This page offers links to various examples of how you can use Easy GIS .NET Desktop Edition in your own .NET Windows applications, as well as instructions on how to add a reference to the Easy GIS .NET ShapeFile control to your Visual Studio projects.

Easy GIS .NET is written in C# using version 2.0 of the .NET Framework. In order to use the libraries in your own projects you will need to have version 2.0 or later of the .NET framework installed. All of the examples available to download include Visual Studio 2005 and Visual C# 2005 Express Edition solutions. The examples will also run in later versions of Visual Studio.

To download the examples click on the links to the left.


Including a reference to the Easy GIS .NET class libraries in your own projects

To add a reference to the Easy GIS .NET class libraries in your own projects perform the following steps.

  • Start Visual Studio and create a new Windows Application project.
  • Copy EGIS.ShapeFileLib.dll and EGIS.Controls.dll to your project directory.
  • Right-click on the project's References folder and click on "Add Reference..". See Figure 1.
    add reference 1
    Figure 1
  • Click the Browse tab and select EGIS.Controls.dll and EGIS.ShapeFileLib.dll. See Figure 2.
    add reference 2
    Figure 2

Adding the Easy GIS .NET ShapeFile Control to the Visual Studio Design Toolbox

To add the Easy GIS .NET Controls to the Design Toolbox perform the following steps.

  • Right-click on the designer Toolbox and select "Choose Items.." as shown in Figure 3.
    add controls 1
    Figure 3
  • When the Choose Toolbox Items dialog opens click on Browse and navigate to the location of the EGIS.Controls.dll class library you added to your project.
  • Select the SFMap and ShapeFileListControl controls as shown in Figure 4 and click OK.
    add controls 2
    Figure 4
  • You should now be able to drag the Easy GIS .NET controls from the Toolbox onto your Windows Forms. See Example 1 for example code on using the SFMap control to display a shapefile in a Windows Application.