[Lazarus] Editing a TDBf record

Marco van de Voort marcov at stack.nl
Mon Dec 1 14:51:53 CET 2008


OSPrinters in rawmodetest example is added to lpr file.
Check your project lpr.

Boguslaw

Diwakoe pisze:
> Dear all,
> 
> Today I try to create printing application using raw mode on win2003,
> sample printing program find at component folder compiled using 0.9.26
> with fpc 2.2.2 svn rev:16885 and run well. All printers show including
> network share printer can print text.
> 
> I try to create new project using code take from examples only one
> event which is show list of printers on Form Create even, compiled
> with no error but error when run (attached).
> 
> Is this code is not suitable with 0.9.26? but why on example folde can
> compile and running well when compiled with this version?
> 
> Any help is appreciated.
> 
> Regards,
> Diwa
> 
> Bellow is the code:
> ------------------------
> unit Unit_prt_raw;
> 
> {$mode objfpc}{$H+}
> 
> interface
> 
> uses
>   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
>   StdCtrls, Printers;
> 
> type
> 
>   { TForm1 }
> 
>   TForm1 = class(TForm)
>      ListBox1: TListBox;
>      procedure FormCreate(Sender: TObject);
>   private
>     { private declarations }
>   public
>     { public declarations }
>   end;
> 
> var
>   Form1: TForm1;
> 
> implementation
> 
> { TForm1 }
> 
> procedure TForm1.FormCreate(Sender: TObject);
> begin
>    ListBox1.Items.Assign(Printer.Printers);
> end;
> 
> initialization
>   {$I unit_cetak.lrs}
> 
> end.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list