Console Code App to Windows Forms

Hey, I have a fully functioning console app, I would like to turn it into an app with a UI. Using VC++ I have created a simple UI and done a bit of research to see that rather than your standard cin you can just create a textbox and use

String ^ input = textBox1->Text;

My question is how do I make the variable input global, as all of the buttons are private, and second of all how do I execute code from my main function that I already wrote in console? do I just make a call to the main function from the button click or do I need to dump the code from my main into the button. If that is the case, and seeing how a string is made in Windows Forms, will I need to change the syntax of my existing code?
Last edited on
Topic archived. No new replies allowed.