You are on page 1of 2

VB Aero Glass effect

Hello ! In this tutorial I'll teach you how you can change your form layout to the Aero theme. The Aero theme is a theme that you can only use in Windows Vista and Windows 7. Start by creating a new project (windows forms application) and call it Aero Effect. Double click form1 once the design has loaded. Add the following codes: Imports System.Runtime.InteropServices Public Class Form1 Public cxLeftWidth As Integer Public cxRightWidth As Integer Public cyTopHeight As Integer Public cyButtomheight As Integer End Structure End Function Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try BackColor = Color.Black Dim margins As MARGINS = New MARGINS margins.cxLeftWidth = 0 margins.cxRightWidth = 0 margins.cyTopHeight = 50 margins.cyButtomheight = 0 Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins) Catch ex As Exception MsgBox(ex.Message) End Try

End Sub End Class

You might also like