Extend Transparent Glass to form(Window 7)

trpsjt2008 0 Tallied Votes 127 Views Share

Create Panel And ToolStrip in panel
Panel Property

Dock = Dock At Left Or Right Or Buttom Or Top 
High = 40
Backgroundcolor = Black

ToolStrip Property

Dock = None
RenderMode = System
GripStyle = Hidden
Background = Transparent
ImageScalingSize = 32,32

U Can Extend any side
by this

margins.cyButtomheight = 40


margins.cxRightWidth= 40


margins.cyTopheight = 40


margins.cxLeftwidth = 40

Then Edit Your Toolstrip

Imports System.Runtime.InteropServices

Public Class Form1
<StructLayout(LayoutKind.Sequential)> _
Public Structure MARGINS
Public cxLeftWidth As Integer
Public cxRightWidth As Integer
Public cyTopHeight As Integer
Public cyButtomheight As Integer
End Structure

<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
On Error Resume Next
Dim margins As MARGINS = New MARGINS
'U can Edit Side Here Top Buttom Left Right
margins.cyButtomheight = 40
Dim hwnd As IntPtr = Me.Handle
Dim result As Integer = DwmExtendFrameIntoClientArea(hwnd, margins)
End Sub

End Class