Multimedia Delphi

Cok iyi test etmemis olmama ragmen, TFax isimli freeware
bir component ile delphi icerisinden fax gondermek mumkun.
Ornek olarak, Quick Report ile hazirlanmis bir raporun nasil
gonderilecegini gosterecegim;
Not 1: TFax component'ini http://www.commlinx.com.au/tfax.htm
adresinden edinebilirsiniz...
Not 2: Bu bahsi gecen component, artik support edilmemektedir.
procedure SendFax;
var
Fax: TFax;
iCurrentPage: Integer;
mCurrentPage: TMetaFile;
Bitmap: TBitmap;
Picture: TPicture;
begin
// Initialize TFax Component...
Fax := TFax.Create(nil);
Fax.FaxDevice := fdCOM2;
Fax.FlowControl := fcNone;
Fax.PhoneNo := 'Fax Numarasi';
// The following line generates the report in the background...
QReport.Prepare;
iCurrentPage := 1;
// Fax component connects to the remote machine...
Fax.StartFax;
// Loop through the pages available in the report...
while (iCurrentPage <= QReport.QRPrinter.PageCount) Do
begin
// Get the (iCurrentPage)th page as a metafile object
mCurrentPage := QReport.QRPrinter.getPage(iCurrentPage);
// The following block draws the page on a canvas
***********************************************************
Picture := TPicture.Create;
Picture.Assign(mCurrentPage);
Bitmap := TBitmap.Create;
Bitmap.Width := mCurrentPage.Width;
Bitmap.Height := mCurrentPage.Height;
Bitmap.Canvas.Draw(0, 0, Picture.Graphic);
************************************************************
// Send the page...
Fax.SendPage(Bitmap.Canvas, Bitmap.Canvas.ClipRect, iCurrentPage <> QReport.QRPrinter.PageCount);
// Clean up...
Bitmap.Free;
Picture.Free;
mCurrentPage.Free;
// Next Page...
iCurrentPage := iCurrentPage + 1;
end;
Fax.Free;
end;
Her zamanki gibi exception handling mekanizmasi ornek kod icerisinde bulunmamaktadir. Bu konu ile ilgili bilgi almak
istiyorsaniz, webmaster tarafindan yazilmis olan bir makale bulunmaktadir...
ali