K
kekein
Unregistered / Unconfirmed
GUEST, unregistred user!
我在运行下面这个程序的时候发现异常,提示是:
Project form1.exe raised exception class Eaccessviolation with message 'Access violation
at address 011E5348 in module 'IMFNT5.DLL'.
有没有哪位知道为什么的,
unit Form1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,printers ;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
printer.begin
Doc;
printer.canvas.Pen.Style:=pssolid;
printer.canvas.Pen.Width:=2;
printer.canvas.MoveTo(0,0);
printer.canvas.LineTo(printer.pagewidth,printer.pageheight);
printer.EndDoc;
end;
end.
Project form1.exe raised exception class Eaccessviolation with message 'Access violation
at address 011E5348 in module 'IMFNT5.DLL'.
有没有哪位知道为什么的,
unit Form1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,printers ;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
printer.begin
Doc;
printer.canvas.Pen.Style:=pssolid;
printer.canvas.Pen.Width:=2;
printer.canvas.MoveTo(0,0);
printer.canvas.LineTo(printer.pagewidth,printer.pageheight);
printer.EndDoc;
end;
end.