[simpits-tech] Any Delphi GURU out there - or wheres Roy

paul needham paul.2.needham at btconnect.com
Sun Mar 7 08:27:44 PST 2004


   
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/bf7e3b25/attachment-0001.html


More information about the Simpits-tech mailing list