22. november 2005 - 15:43Der er
5 kommentarer og 1 løsning
Hvorfor ikke 2 Edit Controls i Borland C++Builder 5.0?
Hvis jeg forsøger at anbringe to Edit Controls på en form i Borland C++Builder 5.0 (Standard-versionen), får jeg en fejlmeddelelse, der bl.a. siger "Klassen findes allerede". Med én Edit Control går det fint. Hvad har jeg misforstået?
Jeg fandt omsider en løsning på nettet. Det har været lidt svært, så jeg skriver den her, hvis andre skulle have haft det samme problem:
Incorrect project settings can lead to unhandled runtime exceptions. Steps to reproduce may explain it best:
How to reproduce the problem:
1) Create or open a Console application that does not use VCL 2) Project | Options, set the "Default" checkbox->ON and click OK 3) Create a new VCL Application 4) Drop two RichEdit components on the Form 5) Project | Options | Packages, set "Build With Runtime Packages"->OFF 6) Run | Run result: Project raised exception class EOSError with message 'System Error. Code: 1410. Class already exists'.
How to fix a problem project:
1) Delete <CBuilder>\BIN\Default.bpr 2) Create a new VCL application 3) Project | Options, set the same options as in the problem project, e.g. turn OFF runtimes packages 4) Do one of these two things: a) Repair the problem .BPR by using the good new project .BPR as a guide to fix the problem .BPR, e.g. change... <ALLOBJ value="c0w32.obj $(OBJFILES)"/> <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
[NOTE: major edits of .BPR source are best done in an editor outside the IDE]
b) Use the new project by adding to it, all the problem projects source. Remove the new projects empty main form and reset main form to the just-added one in Project | Options | Forms.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.