c++builder6 change form names problem

This is a discussion on c++builder6 change form names problem within the C++ Programming forums, part of the General Programming Boards category; Hi I have a question on a practical problem in optical programming with c Builder 6.I have made a project ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    43

    c++builder6 change form names problem

    Hi
    I have a question on a practical problem in optical programming with c Builder 6.I have made a project with forms and buttons and etc.I didnt put the name i want on form captions of forms so the forms are form1 form2 form3.
    Now i wanna change these names so be more specific about what forms do. For example change form1 name and put Introduction form. In this point i wonder how the code on my program will change automatically. If for example is form1->close(); how will change when i will change the name of form.
    To close i want the programm run with new names but with no mistakes.
    If everyone have any idea please post it.
    Thank you

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You want a "refactor" feature like Eclipse has - with that, you can globally rename a particular name within the whole project.

    Having said that, it's usually fairly easy to just change the name with a global search/replace operation (only caveat is if you are using the same name for multiple purpose in different places, and don't want to change all places). The compiler will (99% of the time) tell you if you missed one.

    I'd suggest you make one change at a time and test thoroughly after each change - it's so much easier to check a few changes for where it went wrong than to check hundreds.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    at runtime simply call it as:

    formName->Caption = String;

    or at design time, bring the form to the foreground and set it in the object inspector.

    there is also the Name property, and IIRC, if Name == Caption, changing the Name property automatically changes the Caption also. At least it does at design time, never tried it during runtime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with some simple code =/
    By Josh Norton in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2004, 06:27 AM
  2. help with calculating change from a dollar
    By z.tron in forum C++ Programming
    Replies: 3
    Last Post: 09-13-2002, 04:58 PM
  3. A change.... a problem!
    By CodeMonkey in forum C++ Programming
    Replies: 2
    Last Post: 03-15-2002, 10:16 PM
  4. Help with a bit of tweeking on form feed
    By breed in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 06:45 AM
  5. Replies: 2
    Last Post: 09-04-2001, 03:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21