1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51:
| unit BCForm;
interface
uses Classes, Graphics, Forms,ExtCtrls,Windows;
type TBCForm = class(TForm) constructor BCCreate(AOwner: TComponent;pWidth,pHeight: Integer); destructor Destroy; override; private background: TImage; end;
implementation
constructor TBCForm.BCCreate(AOwner: TComponent;pWidth,pHeight: Integer); var buffer: TPicture; begin inherited Create(AOwner); self.Width := pWidth; self.Height := pHeight; buffer := TPicture.Create; background := TImage.Create(self); background.Width := self.Width; background.Height := self.Height; background.Picture.Bitmap.Canvas.FloodFill(1,1,clWhite,fsSurface); background.Picture.Bitmap.Canvas.Pen.Color := RGB(159,159,159); background.Picture.Bitmap.Canvas.Rectangle(0, 0, self.Width, self.Height); buffer.Bitmap.LoadFromResourceName(HINSTANCE,'AlphaMitRand_Ecke_lo'); background.Picture.Bitmap.Canvas.Draw(0,0,buffer.Graphic); buffer.Bitmap.LoadFromResourceName(HINSTANCE,'AlphaMitRand_Ecke_ro'); background.Picture.Bitmap.Canvas.Draw(Width-20,0,buffer.Graphic); buffer.Bitmap.LoadFromResourceName(HINSTANCE,'AlphaMitRand_Ecke_lu'); background.Picture.Bitmap.Canvas.Draw(Width-20,Height-20,buffer.Graphic); buffer.Bitmap.LoadFromResourceName(HINSTANCE,'AlphaMitRand_Ecke_ru'); background.Picture.Bitmap.Canvas.Draw(0,Height-20,buffer.Graphic); buffer.Destroy; self.TransparentColorValue := clBlue; self.TransparentColor := TRUE; end;
destructor TBCForm.Destroy; begin background.Destroy; inherited Destroy; end;
end. |