-
March 8th, 2008, 03:56 PM
#1
Vista Aero
Hello. How can I enable the cool vista aero effects within my vb.net application? I wish to make portions of the form, or prehaps even the whole form, have the transparent glass effect. Any thoughts?
-
March 8th, 2008, 04:15 PM
#2
Re: Vista Aero
Nice signature there.
Which version of .NET are you using? Have you heard about Windows Presentation foundation? Or even simpler, have you tried setting the Opacity property of the form?
-
March 8th, 2008, 06:31 PM
#3
Re: Vista Aero
Think you misspelled the link, otherwise, you forgot this:
Great sfotware comes from great thinkers
-
March 8th, 2008, 07:36 PM
#4
Re: Vista Aero
Haha thanks guys. I am currently using VB.NET 2005. Adjusting the opacity just changes the visibility of the form. I am looking to use the windows API if it is available to create the glass look for portions of my form.
Another unreleated question, do any of you know how to make vista go to sleep with a function withing VB.NET? I was looking and could not find anything. Thanks in advance.
-
March 10th, 2008, 09:53 AM
#5
Re: Vista Aero
Good to see you again TCanuck!
To get the Aero Glass effect, I think you can try the DwmExtendFrameIntoClientArea API. I stand corrected though, but test this application on your Vista, as only Vista supports the Desktop Window Manager DLLs
I hope it helps
Last edited by HanneSThEGreaT; December 19th, 2008 at 03:21 AM.
-
March 10th, 2008, 01:38 PM
#6
Re: Vista Aero
The above post by Hannes is basically based on WPF. Look at this link on MSDN.
Added the link..
http://blogs.msdn.com/tims/archive/2...18/578637.aspx
Last edited by Shuja Ali; March 10th, 2008 at 01:45 PM.
-
October 6th, 2009, 12:37 PM
#7
Re: Vista Aero
This is an older thread, but I found it with a direct google search.
Since, there isn't a complete answer to this question in the forum, I figured this may help someone else searching for a quick answer.
Although, Hannes was right ofcourse.
Code:
Private Declare Function apiDwmExtendFrameIntoClientArea Lib "dwmapi" Alias "DwmExtendFrameIntoClientArea" (ByVal hWnd As Int32, ByRef pMarinset As MARGINS) As Int32
Private Declare Function apiDwmIsCompositionEnabled Lib "dwmapi" Alias "DwmIsCompositionEnabled" (ByRef enabledptr As Boolean) As Boolean
Public Structure MARGINS
Public cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight As Int32
End Structure
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IsAeroEnabled() = True Then
Me.BackColor = Color.Black
GlossWindow(Me.Handle.ToInt32, -1, 0, 0, 0)
End If
End Sub
Public Function IsAeroEnabled() As Boolean
apiDwmIsCompositionEnabled(IsAeroEnabled)
End Function
Public Sub GlossWindow(ByVal hWnd As Int32, ByVal leftMargin As Int32, ByVal rightMargin As Int32, ByVal topMargin As Int32, ByVal bottomMargin As Int32)
Dim margins As New MARGINS
margins.cxLeftWidth = leftMargin
margins.cxRightWidth = rightMargin
margins.cyTopHeight = topMargin
margins.cyBottomHeight = bottomMargin
apiDwmExtendFrameIntoClientArea(hWnd, margins)
End Sub
Last edited by TT(n); October 7th, 2009 at 10:31 AM.
-
October 7th, 2009, 04:19 AM
#8
Re: Vista Aero
Remember that the Aero theming is not available in Vista Home Basic or Windows 7 Starter editions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|