Google Answers Logo
View Question
 
Q: MSVS 7.1 C++ .NET windows form app challenge - need simple MS solution ( No Answer,   0 Comments )
Question  
Subject: MSVS 7.1 C++ .NET windows form app challenge - need simple MS solution
Category: Computers > Programming
Asked by: chris2002micrometer-ga
List Price: $5.00
Posted: 15 Nov 2006 08:03 PST
Expires: 15 Nov 2006 14:00 PST
Question ID: 782947
MSVS 7.1 C++ .NET windows form app challenge I make a lot of use of VB
for quick little apps with textbox i/o and buttons to run my
calculations. I do this b/c it is EASY in spite of all the
condemnations I hear of VB being
inferior to VC++. I would like to start using VC++ for the same things
to get more comfortable with it in anticipation of larger projects
where it might actually be justified.

Every college textbook I see about C++ doesn't even attempt to use the
GUI. It is always "cout, cin" and an ugly black console display. I
want a GUI form with buttons. Nobody is going to pay me for "DOS"
programs, even if they do
pick the right stock trades. Unfortunate and stupid, but very true. 

Here is the challenge: SHOW ME HOW TO:

Making the appwizard choices that get me started in a VB-like setting
e.g. a form and a toolbox, I still find I cannot do the most
elementary things like getting data in to and out of the pgm with a
textbox. For all of the power and glory of C++, it "cannot convert"
from one elementary data type to another. Strings, which never were
part of C, are still an "afterthought" requiring special class
libraries to do the most mundane stuff. After a fair amount of
fruitless web searching, I found some expert opinion claiming that
VC++ "did not support drag/drop gui design" such I am attempting to
do. I find this very
difficult to believe. 

SHOW ME HOW TO GET VALUES IN AND OUT THRU A TEXTBOX THAT ALLOW SIMPLE
FINANCIAL CALCULATIONS TO BE DONE WHEN THE BUTTON IS PRESSED. 


This is my code. I cannot copy the textbox contents to an integer, or
vise versa. I can, however, type text in that I can add to the
listbox. There seems to be a big distinction between "managed" strings
and regular ones that may further complicate using traditional
"strcat" type functions. Is there
a simple, native-mode fix e.g. not requiring some bloated, 3rd-party,
non-M$ libraries?

private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
//s2 string = S"s2";
System::String __gc * s3 = "s3";
//System::Int32 __gc * a3=0;
int a2=66;
//String * s2 = "s2";
//a3++;//a3=+55;
//s3=a3->ToString();
//a3.ToString (s3);
//itoa(a2, s2, 10);
//CString s3(s2); 

this->textBox1->Text= s3;
this->listBox1->Items->Add(textBox1->Text);

}

};
}
//created as MSVS 7.1 C++ .NET windows form app
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy