Creating a Glass(Clear) form
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
6 posts
Page 1 of 1
Taking advantage of the windows aero theme.
Make a new application and import this code!
Make a new application and import this code!
Code: Select all
Your welcome! Design away!
Imports System.Runtime.InteropServices
Public Class Form1
<Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Public Structure MARGINS
Public LeftWidth As Integer
Public RightWidth As Integer
Public TopHeight As Integer
Public Buttomheight As Integer
End Structure
<Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Me.BackColor = Color.Black
Dim margins As MARGINS = New MARGINS
margins.LeftWidth = -1
margins.RightWidth = -1
margins.TopHeight = -1
margins.Buttomheight = -1
Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
Catch ex As Exception
MsgBox("You need too use the windows aero style!", vbCritical, "Fatal Error")
Application.Exit()
End Try
End Sub
End Class
This tutorial have been posted many times, but since you are new you cant know about them, no -rep 

LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

Why not instead of showing a messagebox, just return to the normal visual design?
You can also use DwmEnableBlurBehindWindow for a similar effect:

Code: Select all
Then use this code to use it:
<StructLayout(LayoutKind.Sequential)> _
Public Structure DWM_BLURBEHIND
Public dwFlags As DwmBlurBehindDwFlags
Public fEnable As Boolean
Public hRgnBlur As IntPtr
Public fTransitionOnMaximized As Boolean
Sub New(ByVal _dwFlags As DwmBlurBehindDwFlags, ByVal _fEnable As Boolean, ByVal _hRgnBlur As IntPtr, ByVal _fTransitionOnMaximized As Boolean)
dwFlags = _dwFlags
fEnable = _fEnable
hRgnBlur = _hRgnBlur
fTransitionOnMaximized = _fTransitionOnMaximized
End Sub
End Structure
<Flags()> _
Public Enum DwmBlurBehindDwFlags As UInteger
DWM_BB_ENABLE = &H1
DWM_BB_BLURREGION = &H2
DWM_BB_TRANSITIONONMAXIMIZED = &H4
End Enum
<DllImport("dwmapi.dll")> _
Private Shared Sub DwmEnableBlurBehindWindow(ByVal hwnd As IntPtr, ByRef blurBehind As DWM_BLURBEHIND)
End Sub
Code: Select all
DwmEnableBlurBehindWindow(Me.Handle, New DWM_BLURBEHIND(DwmBlurBehindDwFlags.DWM_BB_ENABLE, True, Me.Handle, True))
Or you use the cheatmasterbw aeroglasseffect.dll
)

Practice makes perfect!
VIP since: 6-10-2011
VIP since: 6-10-2011
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023