AeroGlass with VB.net [duplicate]
Asked Answered
K

2

1

I was working on how to add glass effect to a win forms in vb.net or c#

I looked a lot of examples like using e.graphics to make a square with the win form dimension and others are done really good without any e.graphics trick.

But my problem is that I didn't look any example that uses windows controls like buttons, labels, dropdowns, etc on a glass effect win form.

Searching on the web I found this article for C++:

http://www.codeproject.com/Articles/18910/Adding-or-Retrofitting-Aero-Glass-into-Legacy-Wind

If you look at the images from the article, I am having that problem and I wish to do something like that for .NET

Knowledge answered 14/3, 2012 at 1:24 Comment(0)
B
0

The answers in here provide a great value for your question: Windows aero glass form text problem

Because of the inherent limitation of WinForms, you can either use owner-drawn controls, or put a solid-color panel on back of the controls, or use a modern transparency-compatible solution, like WPF.

Berseem answered 14/3, 2012 at 2:51 Comment(2)
Thank you very much, this helps and I integrate this to my project. One more question, do you know how to change background from aeroglass? I looked that it takes the color of the user. For example, if my taskbar is aeroglass-black, then my winform is black too and I don't know if this is so good because some people will have maybe pink color and I don't want my form to be in that color :-)Knowledge
@Oscar: You can't change the color. The entire point of enabling the Aero Glass effect on your form is that it uses the same color as all the other glass in Windows. The user is able to control the glass color, and if they want it pink, well then it should be pink. This is just a variation on the old standard way of changing Windows system colors, where the default was a light gray color for 3D controls, but you could change that to anything else you wanted. Your forms (which by default used the light gray 3D color) would then render with the user's selected color scheme.Termite
T
0

Use this to convert the example from C# to VB

Example in C#

Tallyman answered 14/3, 2012 at 2:22 Comment(1)
I found that example before but doesn't solve my question because If you try to add a windows form element like a button, it loses it's design (like a white shadow is added in the hole control) and thats what the C++ article link describes.Knowledge
B
0

The answers in here provide a great value for your question: Windows aero glass form text problem

Because of the inherent limitation of WinForms, you can either use owner-drawn controls, or put a solid-color panel on back of the controls, or use a modern transparency-compatible solution, like WPF.

Berseem answered 14/3, 2012 at 2:51 Comment(2)
Thank you very much, this helps and I integrate this to my project. One more question, do you know how to change background from aeroglass? I looked that it takes the color of the user. For example, if my taskbar is aeroglass-black, then my winform is black too and I don't know if this is so good because some people will have maybe pink color and I don't want my form to be in that color :-)Knowledge
@Oscar: You can't change the color. The entire point of enabling the Aero Glass effect on your form is that it uses the same color as all the other glass in Windows. The user is able to control the glass color, and if they want it pink, well then it should be pink. This is just a variation on the old standard way of changing Windows system colors, where the default was a light gray color for 3D controls, but you could change that to anything else you wanted. Your forms (which by default used the light gray 3D color) would then render with the user's selected color scheme.Termite

© 2022 - 2024 — McMap. All rights reserved.