C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-09-2008, 07:20 AM   #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
Leite33 is offline   Reply With Quote
Old 06-09-2008, 07:50 AM   #2
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
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.
matsp is offline   Reply With Quote
Old 06-09-2008, 08:20 AM   #3
3735928559
 
Join Date: Mar 2008
Posts: 662
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.
m37h0d is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with some simple code =/ Josh Norton C++ Programming 3 02-23-2004 06:27 AM
help with calculating change from a dollar z.tron C++ Programming 3 09-13-2002 03:58 PM
A change.... a problem! CodeMonkey C++ Programming 2 03-15-2002 10:16 PM
Help with a bit of tweeking on form feed breed C Programming 5 11-27-2001 06:45 AM
trying to make change from the price of the item and the amount given. please help!!! tobyman C++ Programming 2 09-04-2001 02:12 PM


All times are GMT -6. The time now is 03:37 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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