- Joined
- Jul 29, 2007
- Messages
- 392 (0.06/day)
- Location
- Portugal
System Name | Lil'Lighty |
---|---|
Processor | Intel Core i3 530 @ Stock |
Motherboard | Asus P7P55D |
Cooling | Artic Cooling Freezer Pro Rev.2 |
Memory | Gskill Ripjaw 1600MHz 9-9-9-24 8GB |
Video Card(s) | MSI GeForce GTX650 OC 1GB |
Storage | WD Blue 500GB AAKS |
Display(s) | ASUS 20' |
Case | Aerocool Aeroengine II // Two 120mm Blue Fans |
Audio Device(s) | Creative SoundBlaster LE // Logitech X-230 |
Power Supply | Corsair VX450W |
Software | Windows 8.1 Pro x64 |
Like the title says:
Has anyone used this code on some kind of app of yours? If so, did it integrate well with glass or not? I'm not being able to make it integrate well.
Code:
Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential)> _
Public Structure MARGINS
Public cxLeftWidth As Integer
Public cxRightWidth As Integer
Public cyTopHeight As Integer
Public cyBottomHeight As Integer
End Structure
Public Class Form 1
<DllImport("dwmapi.dll")> _
Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
End Function
Private Sub Form1_Load(......)
On Error Resume Next
Dim margins As MARGINS = New MARGINS
margins.cxLeftWidth = -1
margins.cxRightWidth = -1
margins.cyTopHeight = -1
margins.cyBottomHeight = -1
'set all the four value -1 to apply glass effect to the whole window
'set your own value to make specific part of the window glassy.
Dim hwnd As IntPtr = Me.Handle
Dim result As Integer = DwmExtendFrameIntoClientArea(hwnd, margins)
End Sub
Has anyone used this code on some kind of app of yours? If so, did it integrate well with glass or not? I'm not being able to make it integrate well.