This project is read-only.

How to solve the controls' problem after using the Aero(DwmEnableBlurBehindWindow)?

Jan 25, 2011 at 7:37 AM

I did a very simple demo with the help of the API called "DwmEnableBlurBehindWindow"


Public Class Form1
    <System.Runtime.InteropServices.DllImport("dwmapi.dll")> _
    Private Shared Sub DwmEnableBlurBehindWindow(ByVal hwnd As IntPtr, ByRef blurBehind As DWM_BLURBEHIND)
    End Sub

    <System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)> _
    Public Structure DWM_BLURBEHIND
        Public dwFlags As UInteger
        Public fEnable As Boolean
        Public hRgnBlur As IntPtr
        Public fTransitionOnMaximized As Boolean
    End Structure

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim sBlur As New DWM_BLURBEHIND
        With sBlur
            .dwFlags = 3
            .fEnable = 1
            .hRgnBlur = 0
        End With
        DwmEnableBlurBehindWindow(Me.Handle, sBlur)
    End Sub
End Class


However, I found some other controls like Label or TextBox's ForeColor will be also transparent.

What should I do now?

Can you offer me a sample please?

Jan 26, 2011 at 8:31 AM

can anybody help me?