4

how to make somthing like this

Windows Forms Glass Effect, Make ImageBox transparent

I use VS 2010

Community
  • 1
  • 1
Data-Base
  • 8,418
  • 36
  • 74
  • 98
  • I found this http://code.msdn.microsoft.com/WindowsAPICodePack , it sounds easy as testing it now, what do you think? – Data-Base Nov 04 '10 at 13:40

3 Answers3

4

If all you are looking for is the standard glass effect (which includes the blur), check out this article:

http://www.codeproject.com/KB/vista/AeroGlassForms.aspx

Basically, all you're doing is extending the window's frame (which already has the glass effect) into the client area. You have to call the DWM API that come with Windows Vista or later using a couple of P/invoke methods because this is not built into the .NET Framework.

EDIT: If you're looking for more control over the blur effect, you might look into more specifically the DwmEnableBlurBehindWindow function from the DWM API, although I have not used this myself.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • I found this http://code.msdn.microsoft.com/WindowsAPICodePack and it seems easy, what do you think? – Data-Base Nov 04 '10 at 13:39
  • I've never used it. I guess I've just gotten into the habit of rolling my own custom libraries for this kind of thing before MS released any kind of code pack. It looks solid and it's definitely worth a try. Though you might consider just copying the relevant code instead of importing an entire library of stuff that you aren't using. – Cody Gray - on strike Nov 05 '10 at 04:28
2

Take a look at this:

http://msdn.microsoft.com/en-us/library/aa969512(VS.85).aspx

The MARGINS array is similar to margins on an HTML page. The first example on MSDN gives the margins for the glass effect 25 pixels in height on the bottom of the window.

Evan Mulawski
  • 54,662
  • 15
  • 117
  • 144
1

This MS tutorial is fairly easy to understand and uses C#.

Liviu Mandras
  • 6,540
  • 2
  • 41
  • 65