You've already forked lazarus-ccr
Initial commit of ported HTML Components, version 0.0.2
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@995 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
43
components/thtmlport/demo_src/imgform.pas
Normal file
43
components/thtmlport/demo_src/imgform.pas
Normal file
@@ -0,0 +1,43 @@
|
||||
unit ImgForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
ExtCtrls;
|
||||
|
||||
type
|
||||
TImageForm = class(TForm)
|
||||
Image1: TImage;
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
ImageFormBitmap: TBitmap;
|
||||
end;
|
||||
|
||||
var
|
||||
ImageForm: TImageForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$IFNDEF LCL}
|
||||
{$R *.DFM}
|
||||
{$ENDIF}
|
||||
|
||||
procedure TImageForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Image1.Picture.Bitmap := ImageFormBitmap;
|
||||
Width := Image1.Width + 30; {makes for better fit}
|
||||
ClientHeight := Image1.Height;
|
||||
ClientWidth := Image1.Width;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$IFDEF LCL}
|
||||
{$I ImgForm.lrs} {Include form's resource file}
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user