[Lazarus] Raw print error

Diwakoe diwakoe at gmail.com
Mon Dec 1 04:43:17 CET 2008


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.


-- 
Semua rasa ada disini
http://www.teoteblung.co.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_print_error.png
Type: image/png
Size: 5329 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081201/19196496/attachment-0006.png>


More information about the Lazarus mailing list