Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET Interface and Graphics > Transparency mask on PictureBox's


Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2006, 02:39 AM
tengu's Avatar
tengu tengu is offline
Newcomer
 
Join Date: Apr 2005
Location: Sweden
Posts: 20
Question Transparency mask on PictureBox's


Hi.

I am trying to do an interface designer to create plugins for a certain software. So to be able to create visible buttons that can be moved and resized and all that, I choose a PictureBox.

The problem I am facing is that I can't create a transparency map or mask for pictureBoxes. I can for the actual form but not for PictureBox's. I have tried to check out other controls to use instead of a picturebox but I find none to allow transparency masks.

This is not a matter of life or death, just a matter of cosmetics.


Glad for any tips or hints.


Best regards
Patrik Westlin

PS: If I succeed in this I will add it to my tutorial that I am writing. The tutorial is about creating controls programmatically at runtime and giving them all sorts of features.
Reply With Quote
  #2  
Old 03-23-2006, 03:39 AM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
Default

Well, to give a control a transparent region, I think you can create a GraphicsPath object that specifies the shape and convert the GraphicsPath to a Region, then assign the region to your Picturebox.Region.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 03-24-2006, 06:43 AM
tengu's Avatar
tengu tengu is offline
Newcomer
 
Join Date: Apr 2005
Location: Sweden
Posts: 20
Default

Quote:
Originally Posted by Iceplug
Well, to give a control a transparent region, I think you can create a GraphicsPath object that specifies the shape and convert the GraphicsPath to a Region, then assign the region to your Picturebox.Region.
Wont that just create a clip map instead of a transparency map?

My goal is to create a control in a interface design environment and have handles outside of the actual control so it doesn't obstruct the view of the actual control.

Need to ponder a bit on that one.

Thanks for the hint though.


Best regards
Patrik Westlin
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->