[simpits-tech] Any Delphi GURU out there - or wheres Roy
Erwin Neyt
erwin at sim-instruments.com
Sun Mar 7 12:40:11 PST 2004
Paul,
That line 84 looks ok to me, but I see some other anomalies.
Your main form is FormMain: TFormMain, yet I see: procedure
Tform1.Formestroy(Sender: TObject);
That one will surely upset the compiler.
hope this helps,
Erwin.
_____
From: simpits-tech-bounces at simpits.org
[mailto:simpits-tech-bounces at simpits.org] On Behalf Of paul needham
Sent: Sunday, March 07, 2004 9:28
To: simpits-tech at simpits.org
Subject: [simpits-tech] Any Delphi GURU out there - or wheres Roy
Hi all
I am trying to use FSUIPC and have with my limited programming skills [
pascal and C 8 years ago ! ]successfully complied and hacked the UIPCHello
world file but have failed with the following code.
I want to load a bitmap of my cockpit instruments into the background to a
form, I have go it to 800*640 and 256 colours and made a resource file of
it.
The code below was found on the Net but was for Delphi 1 or 2 and I have
Delphi 7 it fails with the following :-
[Error] MainFormback.pas(84): Object or class type required
[Error] MainFormback.pas(85): Undeclared identifier:
'LoadFromResourceName'
[Error] MainFormback.pas(88): ';' expected but '.' found
[Error] MainFormback.pas(90): Undeclared identifier: 'BackgroundBitmap'
[Error] MainFormback.pas(90): Missing operator or semicolon
[Error] MainFormback.pas(93): Undeclared identifier: 'Formpaint'
[Error] MainFormback.pas(95): Undeclared identifier: 'Canvas'
[Error] MainFormback.pas(95): Undeclared identifier: 'BackgroundBitmap'
[Error] MainFormback.pas(98): Identifier redeclared:
'TFormMain.FormCreate'
[Error] MainFormback.pas(102): Object or class type required
[Error] MainFormback.pas(104): Undeclared identifier: 'LoadFromFile'
[Error] MainFormback.pas(105): Undeclared identifier: 'Form1'
[Error] MainFormback.pas(105): Incompatible types: 'TBitmap' and
'tagBITMAP'
[Error] MainFormback.pas(106): Missing operator or semicolon
[Error] MainFormback.pas(108): Missing operator or semicolon
[Error] MainFormback.pas(109): Undeclared identifier: 'Free'
{ Private declarations }
BackgroundBitmap : TBitmap ;
public
{ Public declarations }
end;
var
FormMain: TFormMain;
implementation
{$R *.DFM}
{$R 262-ins-bk.res}
Uses
FPCuser;
procedure TFormMain.Formcreate(Sender: TObject);
begin
line 84 BackgroundBitmap := TBitmap.create;
BackgroundBitmap.LoadFromResourceName(hInstance,'262-ins-bk');
end;
procedure Tform1.Formestroy(Sender: TObject);
begin
BackgroundBitmap.Free;
end;
procedure TFormmain.Formpaint(Sender: TObject);
begin
Canvas.Draw(0,0,BackgroundBitmap);
end;
Sorry for long boring post !!!
Regards Paul
Despite constant warnings, I have never met anybody who has had their leg
broken by a swan.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.613 / Virus Database: 392 - Release Date: 04/03/2004
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.simpits.org/pipermail/simpits-tech/attachments/20040307/6ab3b992/attachment-0001.html
More information about the Simpits-tech
mailing list