Hi Dpap.
Go to File, Open and open the file ending with .lfm
You will see something like:
object PreviewForm: TPreviewForm
Left = 138
Height = 885
Top = 150
Width = 1365
Caption = 'PDF Preview'
ClientHeight = 885
ClientWidth = 1365
DesignTimePPI = 120
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '2.2.4.0'
object Panel1: TPanel
Left = 25
Height = 17
Top = 868
Width = 463
Caption = 'Panel1'
TabOrder = 0
end
object PaintBox1: TPaintBox
Left = 1
Height = 827
Top = 41
Width = 1347
OnPaint = PaintBox1Paint
end
Then delete the offending object and save and then reload the project.
Also if the the module and form code appear, causing the same errors then
open the lpr file and delete or comment out the part that is unwanted and save.
Sometimes resource files do not load so do
//{$R *.res}or if the form is not working in Application.CreateForm(
TPreviewForm, PreviewForm);
create a Newform and change to: Application.CreateForm(
TNewform, Newform);
Also delete any not needed component names like say for instance
purecode in
uses like in Forms, main_test, libmupdf,
purecodepurecode loads a ruler component in this case.
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, main_test, libmupdf, purecode
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TPreviewForm, PreviewForm);
Application.Run;
end.
Lastly did you change
program project1;
{$mode delphi}to
program project1;
{$mode objfpc}Codes behave differently in the 2 different modes.