Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Borland C++ Builder v6 - Missing form in design mode

Status
Not open for further replies.

minime911

Programmer
Sep 20, 2011
3
Hi everyone

I created a project with a single form in C++ Builder v6 and added some source/header files. Everything resided in the same directory and worked fine. When I renamed and moved the form (.dfm file) and the matching code (.cpp and .h) to a different directory, I was no longer able to view the form in design mode. The form is still there, the project compiles fine and the final executable works as expected too.

I am stuck. :-|
 
There is a resource file (.res) that contains the original name of the form and program files. You should be able to open it in BCB6 and edit it. It's been awhile since I did one that I'm a bit rusty as to the detail. Let us know if you get stuck.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
I deleted the resource file and the IDE generated a new one. If I drag and drop it into the IDE, all I get is gibberish (not ASCII?).
 
I found a partial solution to the problem.

The original TFormMain.cpp had a line: #pragma resource "*.dfm"
I changed it to: #pragma resource "TFormMain.dfm"
Then I changed it back to: #pragma resource "*.dfm"

Now, the form does not appear instantly when I open the project, but only when I do the following:

1. Press Ctrl+F12
2. Select TFormMain (or the name you've given your form) from the list
3. Press F12 for the form to appear

I don't know exactly what happened but it works. Anyone know better, please lets us know.
 
In BCB6 go to Project->Edit Option Source. This will open you *bpr file in xml format. Look for the names of your old form and, possibly, your old location. Make sure you have a really good backup before editing anything.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top