Search the web
Sign In
New User? Sign Up
delphigames · Discussion of game programming in the Delphi development environment.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to make real transparency (with control)?   Message List  
Reply | Forward Message #7586 of 7611 |
Re: How to make real transparency (with control)?

Thank you, thank you very much rbaprog!!!

Here I will share what I have found and hope this will be helpful.

DrawThemeParentBackground works fine on Delphi7 and it is quite
fast. I made some experiments and it has more functoinality than it
is described (for example dc can be any dc, you are not bound to the
control).
On Delphi6 it gives me "Access violation" but for now I would leave
it as it is.
The only drawback is that it works with WinControls only.

CopyRect works fine, but as you said it doesn't take a snapshot
under your control, which is the primary goal.

I found 2 other oportunity:
1. Parent.PaintTo - works fine.
The drawback is that it repaint the control and its child controls
(if you have many and complex controls it will be slow).
And also it tries to draw your control. There is a danger of "Stack
overflow".
2. In Rx library there is routine in VCLutils - CopyParentImage. It
works almost the same as PaintTo, but doesn't draw itself and it is
specialized for TGraphicControls.






Wed Dec 19, 2007 8:49 am

ani_silvia
Offline Offline
Send Email Send Email

Forward
Message #7586 of 7611 |
Expand Messages Author Sort by Date

Hi guys, I'm trying to do control with real transparency – when you put a picture under it you must see the picture trough transparent pixels. Can you give...
ani_silvia
Offline Send Email
Dec 12, 2007
8:13 am

Ani_Silvia <ani_silvia@...> wrote: Hi guys, I'm trying to do control with real transparency – when you put a picture...
rbaprog
Offline Send Email
Dec 13, 2007
9:38 pm

Hi rbaprog, I've read very carefully your post (2 times). Here are some observations: "You can get background using Themes unit" Do you know how? (I know that...
ani_silvia
Offline Send Email
Dec 17, 2007
10:01 am

Ani_Silvia <ani_silvia@...> wrote: "You can get background using Themes unit" Do you know how? (I know that can be done...
rbaprog
Offline Send Email
Dec 17, 2007
9:04 pm

Thank you, thank you very much rbaprog!!! Here I will share what I have found and hope this will be helpful. DrawThemeParentBackground works fine on Delphi7...
ani_silvia
Offline Send Email
Dec 19, 2007
8:49 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help