|
-
Oct 14th, 2004, 05:07 AM
#1
Thread Starter
Addicted Member
draw semi transparent rectangle
Hi all,
does anybody know how to create a semi-transparent filled rectangle on a object? I can draw filled, gradient filled rectangles without any problem. But i now have something in which they need to be semi transparent.
Regards,
per-i
-
Oct 14th, 2004, 11:30 AM
#2
You will ahve to do alpha blending.
There is a sample @vbaccelerator.com:
http://www.vbaccelerator.com/home/VB...on/article.asp
There is also very nice sample by Karl E. Peterson but it only works in Win2K but take a look at it.
Go to http://www.mvps.org/vb/index2.html?samples.htm and download Translucent.zip
-
Oct 14th, 2004, 01:31 PM
#3
We also have some good stuff here in the Forums too!
Alpha + Blend
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 15th, 2004, 02:58 AM
#4
Thread Starter
Addicted Member
Hi all,
RobDog888 the link you gave if for alphablending a form. It requires a Hwnd. I need to alpha blend a rectangle over a control. The control has got a userdrawn event which allows you to do this. It provides you with the measurements of the rectangle and gives you a Hdc for the rectangle. I use alpha blending with form already in my program though.
The sample from vbaccelerator seems to use a Hdc and standard GDI.
The second link doesn't seem to work though
Regards,,
per-i
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|