Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Manitoadlet

Newbie with a question

This topic is 5916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I''m working on something in Visual C++.net and I''m having some trouble. This is probably simple, but I haven''t messed with this much before now. Ok, I''ve got my main form (called MainForm) with a menu, and a textbox (called tester). Now all I want to do is change the Text in the textbox. What I did was the following from the main() function (the textbox is public): MainForm::tester->Text = "Text I want in the box"; and it told me that the stuff to the left of tester->Text needs to be a class/struct/union. MainForm is a class though that I derived from Form so I don''t understand the error. Then I tried adding a function (method whatever the hell you call it) of the textbox that would change the Text and that didn''t work. It said something about calling a static function from a non-static function or something. Anyway, my question is, what is the proper way to go about changing the Text in a textbox without using say a menu command (which works fine BTW but it''s not what I want). "Why not go mad?"

Share this post


Link to post
Share on other sites
Advertisement
Oh forget it. I got another problem to deal with anyway.

"Object reference not set to an instance of an object."

Which seems like another load of bullshit to me, but I''ll work it out.



"Why not go mad?"

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!