I am trying to write a simple program in C++ which has Windows forms. The program I use is Microsoft Visual C++ Express 2008. I start with: File/New Project/CLR/Windows Form Application. I put on the form: two text boxes - textBox1 and textBox2 (where two numbers are to be input), one label box label1 (where the sum of these number is to be displayed), and one button button1 (clicking it should generate the output in label1 field).
Of course, I double click the button (in Form1.h [Design*]) and the following code appears:
so you can't put int/double etc into textBox without converting it to string, because the compiler won't recognize it
e.g. double number1 = textBox1->Text; will cause an error
Thank you very much for your reply. It helped a lot. Now I learned the logic of programming windows forms in C++/CLI (I thought it was much more complicated). I knew the book "Beginning Visual C++ 2008" but I could not find the proper code there. But of course, I will have to study the C++/CLI more thouroughly to find the answers to some other questions!
Once again, thanks, it was very helpful!