2

I would like to create an outer glow effect on a UserControl derived class in c# 2.0 (WinForms). Is this (easily) possible?

If yes, please show me how :)

What I mean with "glow effect" is something like this: enter image description here

Bart Gijssens
  • 1,572
  • 5
  • 20
  • 38

2 Answers2

4

Hope this helps http://www.codeproject.com/KB/buttons/VistaButton.aspx

I also rem reading an article where the author draws 2 rectangles over the button (each is covering half from top and bottom) and then when mouse is hover, he does some overlapping logic. I forgot the full logic. Sorry, ill think/search and come back with the answer.

Zenwalker
  • 1,883
  • 1
  • 14
  • 27
  • Actually, what I mean with "glow" seems to be something else then what that article uses. With glow, I mean the same effect as in photoshop's "outer glow" effect. It's kind of like a drop shadow, but at the 4 sides of a rectangle. The effect that I'm lookin for should be drawn at the outside of the edges of my usercontrol, I'll try to make a picture ;) – Bart Gijssens Jun 09 '11 at 09:30
2

Here are a few tutorials on how to easily achieve halo- and special effects on graphical objects in winforms:

Andrew Morton
  • 24,203
  • 9
  • 60
  • 84
Pedery
  • 3,632
  • 1
  • 27
  • 39
  • I am going to accept this as an answer because it is the closest to what I need. – Bart Gijssens Jun 15 '11 at 09:37
  • You could also create your own blur convolution matrix filter using lockbits() to make it quick, premake the blurry envelope, or use eight pieces of graphics that you could stretch to fit around the textbox. All solutions are pretty easy to achieve. – Pedery Jun 23 '11 at 01:11