🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by Vinko Mon, 21 Apr 2003 21:54
Transparent form
#16835
Author: Vinko
Date: Mon, 21 Apr 2003 21:54
12 lines
1077 bytes
Hi!

I would like to make transparent form , also when
form is resized or moved. Is there any simple way?

I tryed with,
Form->Brush->Style = bsClear;
Form->BorderStyle = bsNone;
but form is not repainted when is moved.

Thank you,
  Saso
Re: Transparent form
#16837
Author: Remy Lebeau (TeamB)
Date: Mon, 21 Apr 2003 22:25
18 lines
1401 bytes
"Vinko" <digitalsv@email.si> wrote in message
news:3ea468b7@newsgroups.borland.com...

> I would like to make transparent form , also when
> form is resized or moved. Is there any simple way?

Override the form's inherited CreateParams() method and include the
WS_EX_TRANSPARENT style to the ExStyle value, ie.

    void __fastcall TForm1::CreateParams(TCreateParams &Params)
    {
        TForm::CreateParams(Params);
        Params.ExStyle |= WS_EX_TRANSPARENT;
    }


Gambit
Re: Transparent form
#16851
Author: Vinko
Date: Tue, 22 Apr 2003 08:09
30 lines
1673 bytes
Hi!

That only works if form is resized, if it is moved
form is not refreshed!

Thank you, Saso

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3ea46fb7$1@newsgroups.borland.com...
>
> "Vinko" <digitalsv@email.si> wrote in message
> news:3ea468b7@newsgroups.borland.com...
>
> > I would like to make transparent form , also when
> > form is resized or moved. Is there any simple way?
>
> Override the form's inherited CreateParams() method and include the
> WS_EX_TRANSPARENT style to the ExStyle value, ie.
>
>     void __fastcall TForm1::CreateParams(TCreateParams &Params)
>     {
>         TForm::CreateParams(Params);
>         Params.ExStyle |= WS_EX_TRANSPARENT;
>     }
>
>
> Gambit
>
>
>
Re: Transparent form
#16874
Author: Damon Chandler (TeamB)
Date: Wed, 23 Apr 2003 06:35
23 lines
1760 bytes
Hi Saso,
> I would like to make transparent form , also when
> form is resized or moved. Is there any simple way?

One way to create a transparent-type form is to define the shape of your
window via a custom GDI region object; specifically, a region that includes
only the non-transparent areas of your form (e.g., the title-bar, resizing
border, and child controls).  See these articles...

  http://www.bridgespublishing.com/articles/
  issues/0002/Image_shaped_forms.htm

  http://www.bridgespublishing.com/articles/
  issues/0111/Custom_buttons__part_III.htm

(Note that Windows 2000/XP+ supports natively translucent and transparent
forms; see
http://www.bridgespublishing.com/articles/issues/0103/Transparent_2000.htm.)

Good luck,
-- 
Damon (TeamB)
BCBCAQ--http://bcbcaq.bytamin-c.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads