Ah, thanks a lot, Niels. Sorry for ignoring this for so long, but as I really am not any good with Delphi, motivation hasn't been on top.. Anyway, this is what I have so far:
delphi Code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, pngimage, ExtCtrls, ImgList;
type
TForm1 = class(TForm)
Image1: TImage;
procedure CreateParams(var Params:TCreateParams); override;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure WMNCHitTest(var M: TWMNCHitTest);
message wm_NCHitTest;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CreateParams(var Params:TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle:=WS_EX_TRANSPARENT;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
BorderStyle:=bsNone;
Brush.Style:=bsClear;
Width:=Image1.Width;
Height:=Image1.Width;
end;
procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited;
if (M.Result = htClient) then
M.Result := htCaption;
end;
end.
Thing is, whenever I move the form around, the background of the form doesn't refresh. Any tips?