#1Ter 28 maio - 22:18
[VB.NET] Aero Glass Form Effect
Vídeo-Aula
Codigo do Video :
Créditos:
#Gabriel
Codigo do Video :
- Código:
Imports System.Runtime.InteropServices
Public Class Form1
<StructLayout(LayoutKind.Sequential)> _
Public Structure MARGINS
Public Destra As Integer
Public Sinistra As Integer
Public Su As Integer
Public Giu As Integer
End Structure
Declare Auto Function DwmIsCompositionEnabled Lib "dwmapi.dll" Alias "DwmIsCompositionEnabled" (ByRef pfEnabled As Boolean) As Integer
Declare Auto Function DwmExtendFrameIntoClientArea Lib "dwmapi.dll" Alias "DwmExtendFrameIntoClientArea" (ByVal hWnd As IntPtr, ByRef pMargin As MARGINS) As Integer
Dim pMargins As New MARGINS With {.Su = -1, .Sinistra = -1, .Destra = -1, .Giu = -1}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim en As Boolean = False
DwmIsCompositionEnabled(en)
If en Then
DwmExtendFrameIntoClientArea(Me.Handle, pMargins)
End If
Me.TransparencyKey = Color.FromKnownColor(KnownColor.ActiveCaption)
Me.BackColor = Me.TransparencyKey
End Sub
End Class
Créditos:
#Gabriel