Aero Glass Screen Effect in VB.NET
Submitted by donbermoy on Thursday, April 23, 2015 - 23:02.
Today, I will teach you how to create a program that has a screen effect of aero glass in vb.net. We often see an aero glass effect as a theme in windows 7.
Now, we will start the tutorial.
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add only a Timer named Timer1 in your Form.
3. Then let's go to the code.
We will import Runtime.InteropServices library to access the operation services during runtime period.
Next, create a Structure named side to declare values of the top, bottom, right side, and left side values.
Then we will import the dwmapi.dll as a Function named DwmExtendFrameIntoClientArea to access the Frame.
In your Timer_Tick have this code below to maximize the opacity of your form.
Then in your Form_Load, we will put values to our side as Structure and will access the result of DwmExtendFrameIntoClientArea then we will enable the time.
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware
- Imports System.Runtime.InteropServices
- Public Structure side
- Public Left As Integer
- Public Right As Integer
- Public Top As Integer
- Public Bottom As Integer
- End Structure
- <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As side) As Integer
- End Function
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If Me.Opacity.ToString() > 0 Then
- Me.Opacity = Me.Opacity.ToString() + 0.05
- End If
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Try
- Me.BackColor = Color.Black
- Dim side As side = New side
- side.Left = -1
- side.Right = -1
- side.Top = -1
- side.Bottom = -1
- Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, side)
- Catch ex As Exception
- End Try
- Timer1.Start()
- End Sub
Output:

Add new comment
- 758 views