Tuesday, 15 November 2011
Home »
Tips and Trick Delphi
» Command how to clear (clear) image.
Command how to clear (clear) image.
To Share | Tuesday, 15 November 2011
Give the command picture: = nil in TImage
example:
procedure TForm1.Button1Click (Sender: TObject);
begin
Image1.Picture: = nil;
end;
Example # 2:
procedure TForm1.Button1Click (Sender: TObject);
begin
if OpenDialog1.Execute then
begin
Image1.Picture.LoadFromFile (OpenDialog1.FileName);
end;
end;
procedure TForm1.Button2Click (Sender: TObject);
begin
Image1.Picture: = nil;
end;
No comments:
Post a Comment