[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

Transparent Windows.Forms.Control

Hello,
I've been trying to make a circular shape control, but because the control is rectangle, it has some area I intend to keep empty painted over.

What I need is to be able to set that area as transparent, and even more importantly, make sure mouse clicks on a transparent area aren't caught by the control. (They should be caught by the underlyings underlying controls).

For forms, I'd simply set the transparent area to a color, and set the transparent color of the form to that specific color. However I didn't find the prorperty in controls.

Thanks for any help.
Tomer
0
PHILIPS_MED
Asked:
PHILIPS_MED
  • 2
1 Solution
 
Fahad MukhtarDistinguished EngineerCommented:
Please read the following article to see how to create shaped Windows Forms and Controls in Visual Studio .NET:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchShapedWindowsFormsControlsInVisualStudioNET.asp
See specifically the section "It's Not Hip To Be Square"

As an example see the following article that describe how to write an irregular shaped piano key control
http://www.codeproject.com/cs/miscctrl/LesStPianoKey.asp

0
 
Fahad MukhtarDistinguished EngineerCommented:
0
 
PHILIPS_MEDAuthor Commented:
Good job
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now