Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

AeroUtility | DWM Made easy in one rich class + GDI AeroButton

I don't know about you, but I'm in love with the Windows Aero design. And I have seen a lot of tutorials and sources about creating glass forms adding special design features that are only available on Windows that supports Aero. So the thing that made me code this whole class is the fact that Google Chrome Beta added a glass button in the control box. So I present you, the AeroUtility.

Features:
  • Enable/Disable Aero globally

  • Get/Set the global Aero color

  • Extend the frame into the client area

  • Make the client area blurred/semi-transparent

  • Remove the form header(icon, title, controlbox)

  • Change the Aero style of the form with one property

  • Add control glow

  • Change default progressbar color

  • Add textbox placeholder

  • Add Aero style to listview

  • Add Aero style to treeview

  • Theme all control at the same time

  • Make instance of the class for easier use

  • Use all methods in a shared fashion



AeroUtility:
Spoiler (Click to View)


But wait, there is more, this class includes a custom drawn Aero Button that is fully transparent. It is optimized for the glass background. You also have the ability to change the corner orientation of the button for future updates of the class.

AeroButton:
Spoiler (Click to View)

Notes:
  • Keep in mind that this class is unfinished. I didn't have enough time to continue working on it

  • I plan on adding a ton more features to it, but as I said a lot of the API's are undocumented so it's a lot of trail and error.

  • There are some unused API's in the API class, they will be used eventually.

  • You will notice that the Aero color doesn't work very well, that's because that is not finished aswell. It changes the color, but there are some problems with the opaque options.

  • You might ask yourself why you cannot see the AeroButton in the designer, it's because I planned to make every button change to Aero if the background is Aero styled, but I didn't have time so I left it there. But if you still want to have the button in the designer, you can use this little hack. It's very hacky, but it does the job.: Class AeroButton : Inherits Aero.AeroButton : End Class. The real reason why I did that is because if the app is ran on anything that doesn't support Aero, the button will look like crap.

  • The control glow makes some problems if you use the class in "non-shared" fashion.



Enough talking, here is the code(commented examples included):
http://pastebin.com/LFkfdmRr
Nice, I love to see you contributing :)
From the day I first talked to you till today you've constantly improved your coding style/structure.
Also you have my respect for putting your a lot effort in your programs and share them afterwards.
Good job, Electro :)
Dang, nice work i will test this later on.
Damn. That's really sexy. Would this work on windows 8, or am I stuck with the garbage UI that windows 8 has?
(Sep 21, 2014 12:06 PM)GenericSkid Wrote:  Damn. That's really sexy. Would this work on windows 8, or am I stuck with the garbage UI that windows 8 is?

I don't have a PC with Win8 to test it on, but I doubt that it will work. All of the features first check if it's supported so no errors will occur even if you run it on XP. I will add a ton more features to it, keep it tuned.
Fix ya links!
I really want to see this. :)
Nice work... would love to try it.... ;)
BTC - bc1q3efew3yzfwhdz290dafykaw0a2w56g2j69g2c6
ETH - 0xf1c873217032468990D3313da6509D1b813c4671
USDT - 0xf1c873217032468990D3313da6509D1b813c4671
PP - [email protected]
What it looks like w/ Windows 8:

No extended frame.
Spoiler (Click to View)

Extended frame.
Spoiler (Click to View)

Extended Frame, inactive
Spoiler (Click to View)

Btw it crashed when using Aero.AeroForms.BlurBehind(Me, True)...and XML Documentation would be nice.
Oh, and just in case you didn't know, Aero's Child classes can be inherited. Not sure if you didn't want that or not. (If you do, make API public, because re-declaring API calls for no valid reason in an application is boring..)
(Sep 22, 2014 06:59 AM)Hawk HF Wrote:  Fix ya links!
I really want to see this. :)

The links are up man. Please re-check.


(Sep 22, 2014 09:35 AM)Nikey646 Wrote:  What it looks like w/ Windows 8:

No extended frame.
Spoiler (Click to View)

Extended frame.
Spoiler (Click to View)

Extended Frame, inactive
Spoiler (Click to View)

Btw it crashed when using Aero.AeroForms.BlurBehind(Me, True)...and XML Documentation would be nice.
Oh, and just in case you didn't know, Aero's Child classes can be inherited. Not sure if you didn't want that or not. (If you do, make API public, because re-declaring API calls for no valid reason in an application is boring..)
I don't know if you like it or not, because I do. And about that error, i know that it crashes, lost my patirnce to fix it. It has a problem with thr glow painting.
(Sep 22, 2014 09:35 AM)Nikey646 Wrote:  What it looks like w/ Windows 8:

No extended frame.
Spoiler (Click to View)

Extended frame.
Spoiler (Click to View)

Extended Frame, inactive
Spoiler (Click to View)

Btw it crashed when using Aero.AeroForms.BlurBehind(Me, True)...and XML Documentation would be nice.
Oh, and just in case you didn't know, Aero's Child classes can be inherited. Not sure if you didn't want that or not. (If you do, make API public, because re-declaring API calls for no valid reason in an application is boring..)

With a little customized GDI I think it could work out. Not as good as the default on win 7, but it wouldn't be as bad.
(Sep 22, 2014 12:51 PM)SIM-1456245 Wrote:  The links are up man. Please re-check.

Hmmm... Must have been something with the web server at school.

Anyway, they look great so far.
I look forward to seeing how you'll design the remaining controls.

Also, I'm curious to know how you achieved the outline around the text in the buttons.
(Sep 22, 2014 05:26 PM)Hawk HF Wrote:  Hmmm... Must have been something with the web server at school.

Anyway, they look great so far.
I look forward to seeing how you'll design the remaining controls.

Also, I'm curious to know how you achieved the outline around the text in the buttons.

Wait I remeber, I see what you did there... I just put the text in a graphics path, and from there i draw the outline with black and filled the text with white.
(Sep 22, 2014 05:34 PM)SIM-1456245 Wrote:  Wait I remember, I see what you did there... I just put the text in a graphics path, and from there i draw the outline with black and filled the text with white.

In all the themes and controls I've used, I never considered using a GraphicsPath for text.
That is indeed a great way to do it though.
(Sep 23, 2014 08:14 AM)Hawk HF Wrote:  In all the themes and controls I've used, I never considered using a GraphicsPath for text.
That is indeed a great way to do it though.

To be honest GraphicsPath's are sooo awesome if you get the hang of them. It makes custom shape drawing so easy, but the fact that you can use text in it opens a whole new text effect door.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by ๖ۣۜMephobiaNov 14, 2025 07:54 PM 171 21,487 Nov 14, 2025 07:54 PM
Last Post: ProxyLand
[.NET] by QuobiAug 6, 2022 02:23 PM 0 407 Aug 6, 2022 02:23 PM
Last Post: Quobi
[.NET] by PolarisGangJun 21, 2022 10:09 AM 1 353 Jun 21, 2022 10:09 AM
Last Post: gigajew