Last updated: 22 April 2025

So kompilieren Sie ein C#-Beispielprogramm zum Erfassen von Bildern in Visual Studio

Gaspar van Elmbt

Microsoft Visual Studio ist eine integrierte Entwicklungsumgebung (IDE) von Microsoft. Sie wird verwendet, um Computerprogramme und viele andere Software zu entwickeln.

Die Basisversion von Visual Studio, die Community Edition, ist kostenlos erhältlich.

So kompilieren Sie ein C#-Beispielprogramm zum Erfassen von Bildern 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".

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

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

Step 2: Download and install Visual Studio

1. 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.

Step 3: Set up the environment in Visual Studio

1. Open Visual Studio.

2. Select “Open a 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.

5. Install the .NET SDK if prompted.

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.

2. Check to ensure that the build was successful.

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

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!