Transparency

brandon
03-12-2003, 10:03 AM
Is it possible to make a shape transparent, but still take on a colour?


shpBox1.FillColor = vbINSERTCOLOURHERE (example)

But be able to see what is under the shape on the form, while still keeping it 'on top'?

=\

Machaira
03-12-2003, 10:50 AM
What you're talking about is alpha blending. Try a search here on the forums. There has been plenty of talk about it.

brandon
03-12-2003, 03:26 PM
Found this tidbit of code.. for anyone interested in the future..

and thanks again for the help

Image image(L"Texture1.jpg");
graphics.DrawImage(&image, 10, 5, image.GetWidth(), image.GetHeight());
Pen opaquePen(Color(255, 0, 0, 255), 15);
Pen semiTransPen(Color(128, 0, 0, 255), 15);
graphics.DrawLine(&opaquePen, 0, 20, 100, 20);
graphics.DrawLine(&semiTransPen, 0, 40, 100, 40);
graphics.SetCompositingQuality(CompositingQualityGammaCorrected);
graphics.DrawLine(&semiTransPen, 0, 60, 100, 60);


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/gdi+/usinggdi+/alphablendinglinesandfills.asp

- Brandon

Squirm
03-12-2003, 08:01 PM
In future, post your .Net questions over at www.dotnetforums.net

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum