howardpc: I really am a complete newbie, but I have written a fair amount of code for this project. Do I really have to delete it all and
start again?
Perhaps not. There are always several ways to skin a cat.
First it may be that Never's suggestion (click on the Component Palette selection arrow icon when the project opens) may cure the problem.
If that does not help, try editing your project's main .lpr file, if it contains a reference to the ghost frame. Did you originally create a frame (File->New->Frame, OK) ? You edit this file via Project->View Project source.
If so it will look something like this:
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, Unit2
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Look at the uses clause. Your project may have numerous units. In this example the "Unit2" (or whatever applies in your case) in the uses clause is the name of the frame unit. If you have such a frame unit specified here, simply delete it.
You probably have a backup of your work saved in a \backup directory (depending on your Lazarus settings, but it is there by default). If so, restoring a backup may get you going again, provided it comes from a time before the frame incident.
Failing that, start a new empty project, and add components until its main form matches what you want. You can copy and paste any other forms and/or units needed from your original project (both .pas and .lfm will be needed for forms). You'll have to adjust the main form's uses clause to reflect these new hand-added units.