I am trying create a button that when clicked prints hello world in the text box above it.
however im a complete noob on winforms. I normally just make console programs any tutorials on winforms ? with C++?
FunctionX (http://www.functionx.com/vccli/index.htm) has some decent tutorials for learning the C++/CLI language (the dialect of C++ used with the .NET library) but their winforms tutorials lag behind a version or two.
It seems to be far easier to find C# references for this. I looked for a bit and couldn't find the walkthroughs on MSDN for VC++ or VC# but they usually have videos to show you a basic winforms program. If you can figure it out using C# it doesn't take too much effort to translate it back to C++/CLI.
Play around with it on your own and pop textbox and the button up on the form. Double-click on the button to generate an event handler. That code will execute every time you hit the button. Access the text portion of your textbox via
YourTextBox::Text and set it equal to "Hello World." There are some nuances with the strings (look up "handles" to get some idea of the "^" operator) but you shouldn't have to worry about those to start.
It helps to use 2008 over 2010 because they totally scrapped the Intellisense for C++/CLI in 2010 (at least in the express edition but I'm fairly certain in the full versions as well).
I wish I could have given you a better tutorial to follow but post back if you have any difficulties.
EDIT: LOL at AD ^^^^^^^ but there aren't many good ones for the winforms in C++.
Edited by jonsca: n/a
thanks guys i figured it out
lol @AD i did try google by the way :) i always google first force of habit ya know :) but all i could find were msdn's vids they werent much help. but i did get it.
this->textbox1->Text="this is a pain to understand";
there is literally almost no difference in c# and C++ winforms i found they use the same language to manipulate "tools" aka buttons labels text box's etc.
the only difference is how you code functions for them:)
Edited by avarionist: n/a