Public Class Form1 Private Declare Sub DwmExtendFrameIntoClientArea Lib "dwmapi.dll" (hWnd As IntPtr, pMargins As MARGINS) <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _ Public Class MARGINS Public Left, Right, Top, Bottom As Integer End Class Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Me.BackColor = Color.Black DwmExtendFrameIntoClientArea(Me.Handle, New MARGINS With {.Left = -1}) End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.BackColor = Color.Fuchsia End Sub End Class