主题:请问这程序为什么不能显示Canvas.TextOut
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
I, J, X, Y: Word;
begin
I := 0;
J := 0;
while I < 64000 do
begin
Randomize;
while J < 64000 do
begin
Y := Random(J);
Inc(J);
Canvas.TextOut(10, 10, inttostr(y));
Application.ProcessMessages;
end;
X := Random(I);
Inc(I);
end;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
I, J, X, Y: Word;
begin
I := 0;
J := 0;
while I < 64000 do
begin
Randomize;
while J < 64000 do
begin
Y := Random(J);
Inc(J);
Canvas.TextOut(10, 10, inttostr(y));
Application.ProcessMessages;
end;
X := Random(I);
Inc(I);
end;
end;
end.