[DUG] Transparent Forms

John Bird johnkbird at paradise.net.nz
Wed Mar 29 19:23:14 NZST 2006


Yes, and watch out for Windows 2003 TS - this does not seem to support
Alphablend, so is specific to Windows 5.1 not 5.2

John


-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Kyley Harris
Sent: Wednesday, 29 March 2006 4:27 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Transparent Forms


AlphaBlending is only on XP I think. 

But there is another way to do splash screens, by overriding forms
CreateParams and turning off the OPAQUE setting. 

type
  TMyForm = class(TForm)
    procedure FormCreate(Sender: TObject);
    procedure CreateParams(var Params: TCreateParams); override;
  end;
  
procedure TMyForm.CreateParams(var Params: TCreateParams); begin
  inherited CreateParams(Params);
  // this is the important constant!
  Params.ExStyle:= Params.ExStyle or WS_EX_TRANSPARENT;
end;

Procedure TMyForm.FormCreate(Sender: TObject);
begin
  inherited;
  Canvas.Brush.Style := bsClear;
end;

-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Matthew Comb
Sent: Wednesday, 29 March 2006 4:19 p.m.
To: rohit at cfl.co.nz; NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Transparent Forms

Rohit,

Just a question if you know it. What are the restrictions on AlphaBlending
under windows. I had a feeling that it required XP but could be wrong.

Matt.

> Look at ALphaBlendxxx and TransparentColorxxx
>
> I have only played with it and came to the conclusion that it was good
> for two things.  Games and Viruses.  Oh, you could have some fun and 
> games with it.  Luckily, I am not a practical joker.
>
> Date sent:      	Wed, 29 Mar 2006 15:54:52 +1200
> From:           	Alister Christie <alister at salespartner.co.nz>
> To:             	NZ Borland Developers Group - Delphi List
> <delphi at ns3.123.co.nz>
> Subject:        	[DUG] Transparent Forms
> Send reply to:  	NZ Borland Developers Group - Delphi List
> <delphi at ns3.123.co.nz>
> 	<mailto:delphi-request at ns3.123.co.nz?subject=unsubscribe>
> 	<mailto:delphi-request at ns3.123.co.nz?subject=subscribe>
>
> [ Double-click this line for list subscription options ]
>
> I'm interested in doing a fancy transparent forms (for a splash screen).
>   Ideally I'd just place a PNG onto the form and the transparancy
> would be worked out based on the alpha chanel of the PNG.
>
> Has anyone done anything like this?
>
> --
> Alister Christie
> Computers for People
> Ph: 04 471 1849 Fax: 04 471 1266 http://www.salespartner.co.nz PO Box 
> 13085 Johnsonville
> Wellington
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> Regards
>
> Rohit
>
> ======================================================================
> CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
> PH    (649) 489-2280
> FX    (649) 489-2290
> email rohit at cfl.co.nz  or  r.gupta at xtra.co.nz
> ======================================================================
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi
>


_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi


__________ NOD32 1.1460 (20060328) Information __________

This message was checked by NOD32 antivirus system. http://www.eset.com




More information about the Delphi mailing list