<div dir="ltr"><br><div class="gmail_quote">On Mon, Sep 3, 2012 at 5:55 PM, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graeme@geldenhuys.co.uk" target="_blank">graeme@geldenhuys.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 03/09/12 15:19, Felipe Monteiro de Carvalho wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Transparency is supported, just use TWinControl.SetShape(Region) or<br>
SetShape(Bitmap);<br>
</blockquote>
<br></div>
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?<br>
<br>
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.<br>
<br>
<br>
procedure TForm1.FormCreate(Sender: TObject);<br>
var<br>
r: TRegion;<br>
begin<br>
Width := 400;<br>
<br>
r := TRegion.Create;<br>
FMyContainer := TTransparentContainer.Create(<u></u>self);<br>
FMyContainer.Parent := self;<br>
with FMyContainer do<br>
begin<br>
Left := 50;<br>
Top := 50;<br>
Width := 300;<br>
Height := 200;<br>
r.AddRectangle(0, 0, FMyContainer.Width, FMyContainer.Height);<br>
SetShape(r);<br>
end;<br>
<br>
...<br>
end;<br>
<br>
<br>
See attached image for the results.<br>
<br></blockquote><div><br>That if you want to use a real "window" in the OS as transparent;<br><br>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.<br><br>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.<br>
<br>Uhm any one understand me :)<br><br>Best Regards<br>Zaher Dirkey<br>
</div></div></div>