Extend Transparent Glass to form(Window 7)

trpsjt2008 0 Tallied Votes 141 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
Buttom

margins.cyButtomheight = 40

Right

margins.cxRightWidth= 40

Top

margins.cyTopheight = 40

Left

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.