Hi there,

I'm a Visual Basic novice and have written a very simple GUI which I want to use to run a c++ program. I'm wondering how I would write the button click event to call the C++ program? I assume there's probably a simple way to do this but my searches have been unsuccessful.

Thanks in advance,

V

Re: Run C++ program from button click event in Windows Form application 80 80
Dim lngReturn As Long
lngReturn = Shell("c:\MyProgams\cfile.exe", vbNormalFocus)
Re: Run C++ program from button click event in Windows Form application 80 80

Thanks hkdani, problem solved

Re: Run C++ program from button click event in Windows Form application 80 80

Hi, I am new to windows forms.
I used the 2 lines of code above to launch a c++ code from a windows forms GUI and it worked. Thanks a lot!!

I hope you can help me with the issue below:
My interface includes some text boxes. The user enters some numbers in these text boxes and I want to pass and use these parameters in the c++ code
Any idea how to do it?

Thanks !!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.