windows forms in general
-
In visual c++ 2008 when you create a windows forms application it creates a file called Form1.h What type of file is that and how do you write a program around that to use the values that you input them, use them and output the values of an algebra question for example. I am completely new to windows forms so if you could show an example it would be great. thanks ps if there are any good books that tell you how to program with windows forms that would be great
-
In visual c++ 2008 when you create a windows forms application it creates a file called Form1.h What type of file is that and how do you write a program around that to use the values that you input them, use them and output the values of an algebra question for example. I am completely new to windows forms so if you could show an example it would be great. thanks ps if there are any good books that tell you how to program with windows forms that would be great
Form1.h represents your Form1 (which is a class Form1 derived from System::Windows::Forms::Form), and contains code related to it. We can declare out objects and controls here. Just to give you an idea, following is a small code snippet which takes number from two textboxes (which are already on form1) and after adding these numbers, shows sum in a message box. – ------------------------------------- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { int i; i=System::Convert::ToInt32( this->textBox1->Text); i +=System::Convert::ToInt32( this->textBox1->Text) ; System::Windows::Forms::MessageBox::Show("Sum : "+i.ToString() ); } ----------------------------------------- As you want to get books on Visual C++, I would advice you to search on google. -Dave.
------------------------------------ http://www.componentone.com ------------------------------------
-
In visual c++ 2008 when you create a windows forms application it creates a file called Form1.h What type of file is that and how do you write a program around that to use the values that you input them, use them and output the values of an algebra question for example. I am completely new to windows forms so if you could show an example it would be great. thanks ps if there are any good books that tell you how to program with windows forms that would be great
.h files are header files.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Form1.h represents your Form1 (which is a class Form1 derived from System::Windows::Forms::Form), and contains code related to it. We can declare out objects and controls here. Just to give you an idea, following is a small code snippet which takes number from two textboxes (which are already on form1) and after adding these numbers, shows sum in a message box. – ------------------------------------- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { int i; i=System::Convert::ToInt32( this->textBox1->Text); i +=System::Convert::ToInt32( this->textBox1->Text) ; System::Windows::Forms::MessageBox::Show("Sum : "+i.ToString() ); } ----------------------------------------- As you want to get books on Visual C++, I would advice you to search on google. -Dave.
------------------------------------ http://www.componentone.com ------------------------------------
Thanks, I've got this book: "C++ A Beginner’s Guide by Herbert Schildt" and I ve gone through it all but it doesn't do anything on windows forms unfortunatly. Thanks again
-
Thanks, I've got this book: "C++ A Beginner’s Guide by Herbert Schildt" and I ve gone through it all but it doesn't do anything on windows forms unfortunatly. Thanks again
Hello, I am not very sure about book for learning .Net programming with Visual C++… however using Google I found two links which should be useful for you. 1) Good tutorials on different topics – http://www.functionx.com/vcnet/index.htm 2) Msdn page (I have not checked any of the tutorials available here so don’t know how they are) – http://msdn.microsoft.com/hi-in/library/60k1461a(en-us).aspx I hope this helps. -Dave.
------------------------------------ http://www.componentone.com ------------------------------------
-
Hello, I am not very sure about book for learning .Net programming with Visual C++… however using Google I found two links which should be useful for you. 1) Good tutorials on different topics – http://www.functionx.com/vcnet/index.htm 2) Msdn page (I have not checked any of the tutorials available here so don’t know how they are) – http://msdn.microsoft.com/hi-in/library/60k1461a(en-us).aspx I hope this helps. -Dave.
------------------------------------ http://www.componentone.com ------------------------------------
Thanks for that!!!