Making forms become transparent

Hi experts,

procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show;
end;


I want to make form2 transparent, so i can still see form 1 throught it. How ?

I have an image on form2 thats transparent, but i cant see through form2 to view form 1.
966Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ebob42Commented:
Set AlphaBlend to True, and then give the AlphaBlendValue of the form you want to "look through" a value lower than 255 (but bigger than 1). Experiment for yourself for the best effect...

AlphaBlend := True;
AlphaBlendValue := 64; // for example
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
AlphaBlend is for translucent form, and is available only in newest Delphi.

If what you want is to have some parts of the form transparent, but anything else opaque, you need to play with the window 'region'
a great example of what's possible and how to do it (even use a bitmap as definition of complex transparency shapes) is there :
http://www.hwb.com/gruhn/programming/tutorial/clear.html

0
ebob42Commented:
No, Alphablend is *not* available in the newest Delphi. You're confused with GlassFrame (which only works on Vista or 7 with Aero enabled).

AlphaBlend exists in Delphi 7 and possibly even lower (but I do not have Delphi 6 or lower on my machine anymore)..
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Emmanuel PASQUIERFreelance Project ManagerCommented:
True ! You'll excuse me I switch constantly between Delphi 5 & 7, sometime 2007 I am sometime confused with what is available with what version. And I effectively thought about GlassFrame.

AlphaBlend is not in Delphi 5, it most probably came with 7 (where I just checked it is available).

I never thought of using AlphaBlend, it must be cool combined with regions (thus making forms of any shape with translucency - perfect for a splash screen with animated fading :o)))
0
ebob42Commented:
Indeed, that's why I suggested AlphaBlend. It's one of the least known features, but works on just about any version of Windows (even older ones like 98), and may be exactly what the original poster is looking for...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Emmanuel PASQUIERFreelance Project ManagerCommented:
I sincerely bow humbly before this piece of knowledge. Even if it's not what he's looking for, I thank you for bringing that to my attention.
0
966Author Commented:
i only have delphi 6, installing delphi 7 now to try it out, im so used to 6 now tho..  any ideas?
0
966Author Commented:
delphi 7 is the answer, i knew this already but thought id ask for a way to get delphi 6 to work with it before it finishes downloading. thanks guys anyway
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Pascal

From novice to tech pro — start learning today.