Quote Originally Posted by JuggaloBrotha
Now that is just plain awesome, especially with how easy it is

Any idea to how it runs on an XP system?

Edit: It'll crash in the form load event but that's easy to work around since you can do an OSVersion.Major check before setting the Vista/Win7 api call, which means you're able to use a different theme instead for the older systems

This is pretty slick
I fixed up the code.
So now it will check the users OS before loading the glass.
I mean you can try to download dwmapi.dll and place it to Windows32 Folder but i do not think that it will work.


=Vb.net Code:
  1. Imports System.Runtime.InteropServices
  2. Public Class Form1
  3.     <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Public Structure Side
  4.         Public Left As Integer
  5.         Public Right As Integer
  6.         Public Top As Integer
  7.         Public Buttom As Integer
  8.     End Structure
  9.     <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As Side) As Integer
  10.     End Function
  11.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  12.         Dim strr As String = UCase(My.Computer.Info.OSFullName)
  13.         If strr.Contains("VISTA") Or strr.Contains("WINDOWS 7") Then
  14.             Try
  15.                 Me.BackColor = Color.Black 'It has to be black
  16.                 Dim side As Side = New Side
  17.                 side.Left = -1
  18.                 side.Right = -1
  19.                 side.Top = -1
  20.                 side.Buttom = -1
  21.                 Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, side)
  22.             Catch ex As Exception
  23.                 MessageBox.Show(ex.Message)
  24.             End Try
  25.         Else
  26.             MsgBox("Your OS " & My.Computer.Info.OSFullName.ToString & " Is Supported With Glass.", MsgBoxStyle.Exclamation, "Error Loading dwmapi.dll")
  27.         End If
  28.     End Sub
  29. End Class

Quote Originally Posted by NickThissen
It looks great, but I don't know how useful it is, because control on it don't look that great...
If you were to drag that over a black picture it would look normal.
But i know that is a bug and i will try to fix it.