On Mon, Sep 3, 2012 at 5:55 PM, Graeme Geldenhuys
<[email protected]>wrote:

> On 03/09/12 15:19, Felipe Monteiro de Carvalho wrote:
>
>> Transparency is supported, just use TWinControl.SetShape(Region) or
>> SetShape(Bitmap);
>>
>
> It seems some people have different definitions of "transparency". Will
> that make the TTransparentContainer clear like glass? Will I see through it
> and see the main form's tiled canvas?
>
> Anyway, I'm not 100% sure how to your the TRegion, so tried the following.
> Still no luck. The TTransparentContainer doesn't look "visually"
> transparent / see-thru.
>
>
> procedure TForm1.FormCreate(Sender: TObject);
> var
>   r: TRegion;
> begin
>   Width := 400;
>
>   r := TRegion.Create;
>   FMyContainer := TTransparentContainer.Create(**self);
>   FMyContainer.Parent := self;
>   with FMyContainer do
>   begin
>     Left := 50;
>     Top := 50;
>     Width := 300;
>     Height := 200;
>     r.AddRectangle(0, 0, FMyContainer.Width, FMyContainer.Height);
>     SetShape(r);
>   end;
>
>   ...
> end;
>
>
> See attached image for the results.
>
>
That if you want to use a real "window" in the OS as transparent;

The idea i need a container transparent to see behind it, and ignore any
mouse actions, in another way, this container only can container a child
controls, but do nothing, so it is not a real window, i mean it have no
handle.

In fact, it is TControl bypass any mouse/keys action bypass any drawing to
the window handler, it is easy to make it, but not easy, we cant put
control inside it, and if we use TCustomControl it become a real window and
have handle from the OS.

Uhm any one understand me :)

Best Regards
Zaher Dirkey
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to