Thread: Textbox to string

  1. #16
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    Sorry Elysia If I am a bit slow here. I am not really sure if I understand. I will explain exactly what I am doing.

    I have created a new project. "Windows Forms Application".
    To this I have put a "Button" and a "RichTextBox".

    Now I have doubleclicked the button so I am inside the code of this button.
    When I press this button, the statement written in the "RichTextBox" will be executed like the example above.
    I hope this helped to understand better.

    Thanks

  2. #17
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Oh... Windows forms. Wrong board mate. You want the C# thingie board
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Of course. So is that C++ or C# you're using? Did you go under Visual C++ or C#?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #19
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    I use both C# and C++, for the moment Visual C++ but a solution for C# is also interesting to know about.

  5. #20
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    uh? err... no you aren't?

    EDIT: You do need C# if you plan to do it with Windows Forms.
    Last edited by Mario F.; 02-02-2008 at 07:11 PM. Reason: op edited his post
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #21
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    So this doesn&#180;t work with C++. What could be the difference ?
    I learn both C# and C++ at the same time.

    If I will make this in C#. How will I start ?
    Last edited by Coding; 02-02-2008 at 07:24 PM.

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    It doesn't work in C++ because the way of programming windows is different. You need the C++ Express edition and either use a library like wxWidgets or program with the Win32 API. On any case you don't create a Windows Form Project, but instead a Win32 one.

    In C# with Windows forms, you'll have to ask on the appropriate forum.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #23
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    I will go to the appropriate forum.

    Just to ask.
    So if I use as I have Visual C++ 2008 Express Edtion, will this work here.
    If not, will it work if I add the library wxWidgets ?

    How can I see if I have wxWidgets ?

    Thanks Mario F.
    Last edited by Coding; 02-02-2008 at 07:32 PM.

  9. #24
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Coding View Post
    So if I use as I have Visual C++ 2008 Express Edtion, will this work here.
    If not, will it work if I add the library wxWidgets ?
    Once you have a RichTextBox instantiated, in wxWidgets, getting its contents can be as simple as

    your_text_box.GetValue()

    which returns a wxString object.

    Quote Originally Posted by Coding View Post
    How can I see if I have wxWidgets ?
    If you don't know, chances are you don't have. You need to download and install it. I strongly suggest you read the wiki particularly on matters of installation and first steps.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #25
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    Thank you Mario. I beleive this was a good start for me. I will download this and see what I can do...

  11. #26
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Right, using Windows Forms under C++ means you're using C++ .NET, which is non-standard. Bad. So don't use. Use wxWidgets or something GUI framework.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  2. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM