How to create this borderstyle WinForms - c#

How to create FormBorderStyle with transparency like here:
Thanks!

That is part of the OS. It is called Aero. If the graphics card isnt capable of running Aero, then you won't get that style of window. Another thing to note is that your application will look different on Windows XP, compared to Vista and Windows 7.

You can have Aero theme + transparency on Windows XP too - Adam Nathan's book on WPF explains it in good detail, a quick search for Aero Theme on XP pointed to this blog post.

You probably have to use the Windows API for that. http://msdn.microsoft.com/en-us/magazine/cc163435.aspx explains that you need to use DWM.
Here is some more code for it http://www.codeproject.com/KB/vista/AeroGlassForms.aspx

Related

Transparent Window in .NET

is there any way that winforms or WPF can do this kind of UI? transparent with blur window.
A forenote: Windows 8 removes the Aero Glass effect. Windows will appear with a solid background where there would be glass (like how they appear on Windows 7 when you disable the glass effect but still run the DWM).
That said, the effect is done using Win32's DwmExtendFrameIntoClientArea function. Using this in your program differs depending on whether you're using WPF or WinForms (as WPF windows do some pretty interesting window subclassing, and of course, WPF controls are largely windowless).
To get a "whole glass" window, you just use the DwmExtendFrameIntoClientArea function to fill your window, rather than just the first 50px or so, which is what IE and other browsers do.
This is the canonical MSDN article on how to do this with WPF: http://msdn.microsoft.com/en-us/library/ms748975.aspx
For WinForms, see this blog article: http://blogs.msdn.com/b/tims/archive/2006/04/18/578637.aspx
Enjoy, but not for long considering Windows 8...

c# how to make a Windows 7 aero winform (blured glass)?

how to make somthing like this
Windows Forms Glass Effect, Make ImageBox transparent
I use VS 2010
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.
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.
This MS tutorial is fairly easy to understand and uses C#.

How do you place controls on the chrome of a WPF Window when the user is on Windows XP?

How can you place controls on a frame of a WPF window? I took a look at this but I don't know how to do this in WPF. link textThe problem comes when The application has to run on Windows XP where there is no DWM support. Also, if this is running on Vista without DWM, could the article still work?
The article will not work, at least not exactly as written.
In order to do this on XP, you use the same basic technique, but you need to actually "draw" the chrome yourself, since the DWM doesn't exist in order to do it for you.

Aero Glass Theme (Windows Forms)

A litle while ago I was on Codeproject and came across a cool little tesxteditor and the whole form was made out of aero-glass, and the whole textbox was too. But I can't find it anymore. Does anybody know where it's gone? Or how I can make my Windows Form completely made out of Aero Glass?
Thank you :)
This is for windows forms. not for WPF.
http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx
Could this be what you're after...
Enable Vista glass effect on a borderless WPF window
So this time with the launch of Windows 7, Microsoft provides the Windows 7 API Code Pack. The Windows 7 API Code Pack not only just allows incorporating the aero glass effect, but many other features which will let you to work more conveniently with Windows 7.
The Windows API code pack allows developers to develop those features which are not available with .NET Framework. So to get started visit:
Windows® Code Pack API for Windows 7 & Windows Vista
http://code.msdn.microsoft.com/WindowsAPICodePack
Windows Training Kit
http://www.microsoft.com/downloads/details.aspx?familyid=1C333F06-FADB-4D93-9C80-402621C600E7&displaylang=en
The training kit includes the demos and presentations, hand-on labs for developers. I haven't yet started with Windows 7 development. But as soon as I get started I will blog some demo for Windows 7.

Glass look for MDI windows under Vista

I am developing a winforms MDI application in C# in VS 2008.
I have noticed that the MDI forms don't have the glass look under Vista.
Is this by design?
Is there a simple way to get the glass look for these windows?
By default glass is not enabled on WinForms (or for that matter WPF applications). The only way to enable glass is to PInvoke into native API's. This channel9 site does a tutorial for a great utility that makse it trivial to add Glass effects to your controls.
http://channel9.msdn.com/playground/Sandbox/201158/
Nope, Glass is not available for MDI children.

Categories