CUDA with GUI on Visual Studio 2012, C++

Tell me please.
As it is possible to create a CUDA-application with GUI (not the console) in the Visual Studio of 2012 on With ++.
On Windows form there shall be a Calculation button for calculation for CUDA technology.
The result needs to be removed in Label, TexBox, etc.

so… what’s the problem?

I create a CUDA-application: Create project->CUDA 8.0->I delete the code->I insert the code for computation of integral (I need to remove value of integral in “Label”). I click “To add a new Items”->UI->Windows Forms. Автоматически устанавливается CLR. SubSystem->Windows(/SUBSYSTEM:WINDOWS). Entry Point=“main”

I add a code of start of the form to the .cpp file:

#include “Myform.h”
using namespace System;
using namespace System::Windows:Forms

void main (array <>String^>^ args)
Main_programm::MyForm form;

After compilation there are a lot of errors: error C2653; C2065; C2146; C2065; C2065
I have a question: how to connect the project and what to write in processing of “System:Void button1_Click(System::Object^ sender, System::EventArgs^ e) {…}” to launch a code-CUDA on execution

In settings of the project it is set: “Common Language Runtime Support (/clr)”

Excuse for bad English. Tried to write simply that all understood a problem essence

create ‘empty CLR project’, then add ‘new Windows form’ and main() as you shown above.
you will find empty window when run.

after that, see
preparation for CUDA.

so,… add in your project, then call it in button1_Click(…) member-func.

I supporse you can NOT call device-kernel as:


take a look:

this shows an alternative of <<<…>>>

Many thanks !!
This helped me a lot.