Last updated: 18 July 2025

How to Acquire Images with C# (.NET) in Visual Studio

Gaspar van Elmbt

This guide will walk you through the process of compiling and executing a C# (.NET) sample program provided in the Galaxy Windows SDK using Microsoft Visual Studio 2022 on Windows 11.

How to Acquire Images with C# (.NET) in Visual Studio

Microsoft Visual Studio is a powerful Integrated Development Environment (IDE) used to develop a wide range of applications. The basic edition, Visual Studio Community, is available for free download and use. With Visual Studio and the Galaxy SDK, you can develop custom programs to interact with GigE and USB industrial cameras.

In the following, you’ll learn how to set up your development environment in Visual
Studio, run a C# sample program, and use it to acquire images.

Table of contents

Step 1: Download and install Galaxy Windows SDK

1. Download the Galaxy Windows SDK from VA Imaging’s download page.

2. Extract the downloaded file and run the installation file.

3. If prompted with the message below, click "More info", then click "Run anyway".

Download and install Galaxy Windows SDK

Download and install Galaxy Windows SDK

4. When the installation window appears, click “Install”.

Download and install Galaxy Windows SDK

5. Ensure that "Enable Jumbo Frames" is turned on, then click "Install" to begin the installation.

Screenshot showing to ensure that "Enable Jumbo Frames" is installed

Step 2: Download and install Visual Studio

1. Download and install Visual Studio

Download and install Visual Studio

2. Open the downloaded installation file and allow the necessary permissions on Windows.

3. Click "Install" to begin the installation process.

Click on install

Step 3: Set up the environment in Visual Studio

1. Open Visual Studio.

2. Select “Open a project or solution”.

Picture showing how to open project or solution

3. Navigate to and open the “GxIAPINETSample_VS2015.sln” sample project from the following path:

C:\Program Files\Daheng Imaging\GalaxySDK\Development\Samples\CSharp\x64\src

4. Follow any prompts to install additional components required to run the program by clicking "Install" as shown in the photo.

Picture showing how to install

5. Install the .NET SDK if prompted.

 Install the .NET SDK

Step 4: Build and run a sample

1. From the Build dropdown menu, choose "GxSingleCam_VS2015" (as shown in the provided photo), and then press "Start" to begin the build process.

Build and run a sample

2. Check to ensure that the build was successful.

Screenshot output from the build

3. Once the build completes, click "Open Device" and then "Acquisition Start" to begin the stream.

Screenshot open devices and start acquisition

Step 5: Acquire a picture

1. Set “Trigger Mode” to “On”.

2. Set “Trigger Course” to “Software”.

3. Enable “Save as BMP”.

4.  Press “TriggerSoftware” to capture and save the desired photo.

5. Feel free to adjust the other parameters as needed.

Questions? Ask Us!