Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Transparent form preserving alpha of controls?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Sat Aug 30, 2008 1:46 am    Post subject: [Delphi] Transparent form preserving alpha of controls? Reply with quote

What I want is this. I've been able to achieve this effect with the following code:
Code:
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  Params.ExStyle := Params.ExStyle OR WS_EX_TRANSPARENT OR WS_EX_LAYERED;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Brush.Style := bsClear;
  BorderStyle := bsNone;
end;


Problem is, moving the form carries the rect that was below the form before I moved it.

Can anyone give me information on how I can achieve a fully transparent form that preserves the alpha of the controls, and supports moving / resizing of the window?

_________________
Back to top
View user's profile Send private message MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Aug 30, 2008 3:22 am    Post subject: Reply with quote

How about this?
Back to top
View user's profile Send private message MSN Messenger
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Sat Aug 30, 2008 5:07 pm    Post subject: Reply with quote

SetWindowRgn sets the region of the window that is painted, which includes the controls; what I need is to somehow make the form background transparent, but the controls visible, and preserve the varying transparency of the controls.
_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites