Pas overgeschakeld van Typhon 5.5 naar Typhon 7.0 met FPC 3.3.1.
Heb eerst via CodeTyphon Center: Convert old CT files to new.
Krijg ERRORS en het programma werkt niet meer.
Met COMPILEREN:
Compile Project, Target: DBmuziek64T.exe: Succes!
Met BOUW:
Compile Project, Target: DBmuziek64T.exe: Succes!, Warnings: 1, Hints: 1
udata.pas(51,50) Note: Call to subroutine "operator :=(const source:LongInt):Variant;" marked as inline is not inlined
umain.pas(715,8) Warning: Case statement does not handle all possible cases
Ik ben geen programmeur !!!
Grootste del v.d. code werd door een vriend opgesteld, die ik nu niet meer kan bereiken.
Andere deel kwam via dit forum.
Onderstaande de twee procedures:
Code:
//=============================
procedure TFDATA.SQLQuery1BeforeEdit(DataSet: TDataSet);
begin
VARLastID := DataSet.FieldByName('songid').AsInteger;
end;
//=============================
Code:
//=============================
procedure TFMAIN.PrintForm(centredOnPage: boolean; anOrientation: TPrinterOrientation);
var
// Belangrijk: In uses 'Types' plaatsen.
VARmyBitMap: TBitMap;
VARprnBmp: TBitmap;
VARprnRct: TRect;
VARHScaleFactor: Single;
VARVScaleFactor: Single;
VARaLeft: Integer;
VARaTop: Integer;
VARaSize: TSize;
begin
try
VARHScaleFactor:=Printer.XDPI/Screen.PixelsPerInch;
VARVScaleFactor:=Printer.YDPI/Screen.PixelsPerInch;
VARmyBitMap:= TBitMap.Create;
VARprnBmp:=TBitmap.Create;
try
Printer.Orientation:=anOrientation;
VARmyBitMap.LoadFromDevice(Canvas.Handle);
VARprnBmp.SetSize(trunc(VARmyBitMap.Width*VARHScaleFactor),
trunc(VARmyBitMap.Height*VARVScaleFactor));
VARprnRct:=Rect(0, 0, VARprnBmp.Width, VARprnBmp.Height);
VARprnBmp.Canvas.StretchDraw(VARprnRct, VARmyBitMap);
if centredOnPage then
begin
VARaSize:=Size(Printer.PaperSize.PaperRect.WorkRect);
case Printer.Orientation of
poPortrait: begin
VARaLeft:=(VARaSize.cx - VARprnBmp.Width) div 2;
VARaTop:=(VARaSize.cy - VARprnBmp.Height) div 2;
end;
poLandscape: begin
VARaTop:=(VARaSize.cy - VARprnBmp.Height) div 2;
VARaLeft:=(VARaSize.cx - VARprnBmp.Width) div 2;
end;
end;
end
else
begin
VARaLeft:=0;
VARaTop:=0;
end;
Printer.BeginDoc;
try
Printer.Canvas.Draw(VARaLeft, VARaTop, VARprnBmp);
finally
Printer.EndDoc;
end;
finally
VARmyBitMap.Free;
VARprnBmp.Free;
end;
except on E:Exception do
begin
QuestionDlg('Fout', 'Fout gevonden' + 'ERROR: ' + E.Message,
mtError, [mrOk, 'DRUK HIER OP <--- '], '');
end;
end;
end;
//=============================
Bookmarks