Button to display text box message
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Button to display text box message

  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Question Button to display text box message

    I'm new to GUI programming with windows visual studio 2010.

    I'm currently making a math helping program in c++ windows form application.
    I'm trying to make it so where the user presses the number button I such as 1 button to display a 1 in my textbox.

    Code:
     
    
    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
    			 
    		 }

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,588

    Re: Button to display text box message

    So then simply assign the text "1" (in double quotes, as opposed to the numeric value 1 without the quotes) to the text box' Text property.

    However, you'll probably want to also be able to use your calculator for other numbers than just 0 to 9, so it's probably better to append the newly entered digit to the text inside the text box, so that it doesn't overwrite any digits you already entered there before.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center