You could use a label or textBox to display your int variable. If you wanted to have this displayed when the form loads, all you need to do is double click the form when your viewing Form1.h design..... This creates the 'Form1_Load' event.
As for your variables.... This should work (providing you have a label and textBox (named label1 and textBox1 respectively).
1 2 3 4 5 6
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
int x = 10;
int y = 2;
label1->Text = Convert::ToString(x);
textBox1->Text = y.ToString("N2")
}
Note. the code bit 'ToString("N2")' is useful to set the number of decimal places, even if it is an integer (int)... In the above example, this should display 2.00 in textBox1. i.e. N2 represents 2 decimal places. textBox1->Text = y.ToString(); will work also but will dispaly as an 'int'....
Either bit of code after the = sign would work for label or textBox...
I'm guessing you're using Visual Basic? The code I suggested was for Visual C++ and I'm not familiar with VB. Sorry, I thought that this was your choice of language. As fas as my limited understanding takes me, I think there are similarities between the two (VB vs. VC++). Hence, you have pointed some out already. Both codes do look similar.
Unless someone else replies to assist you, I would suggest looking at some tutorials found on youtube. I found SchoolFreeware's channel very helpful at getting me started:
I haven't used a conversion tool but a quick google came up with 'VBto' which might help. I use Microsoft visual c++ express. It is free to download. There are many people who are quick to point out that visual c++ (windows form programming) isn't c++. However, you can mix c++ style code in your project with careful planning and conversions. The more you do it the better you get at it as with everything in life.