|
-
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.
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
|