PUBLIC goToolbar goToolbar = CREATEOBJECT("BorderlessToolbar") goToolbar.Show() DEFINE CLASS BorderlessToolbar as Toolbar Top = -24 && hide top margin Left = -10 && hide left and right margin * my init PROCEDURE Init() * add main container which we use to control size and visual presentation (borders, picture, etc) this.AddObject( "cntMain", "Container" ) with This.cntMain .Height = 30 * force main container to stretch width of display .Width = 1026 && screenwidth + 2 * ugly color scheme so container stands out .BorderColor = 255 .Backcolor = rgb( 224, 255, 255 ) * add exit button .AddObject("btnExit", "Exitbutton") .btnExit.Move( 3, 4, 80, 22 ) .btnExit.Visible = .T. .Visible = .T. endwith ENDPROC PROCEDURE Show LPARAMETERS nStyle IF DODEFAULT(nStyle) this.Resize() ENDIF ENDPROC PROCEDURE Resize this.SetDisplayRegion(3, SYSMETRIC(9) - 5, this.Width + 3, this.Height + SYSMETRIC(9) - 4) ENDPROC PROCEDURE AfterDock LPARAMETERS nLocation, oForm this.SetDisplayRegion(0, 0, this.Width, this.Height) ENDPROC PROCEDURE Undock LOCAL lnDockPosition lnDockPosition = this.DockPosition IF INLIST(lnDockPosition, 0, 3) this.SetDisplayRegion(3, SYSMETRIC(9) - 5, this.Width - 5, this.Height+ SYSMETRIC(9) - 5) ELSE this.SetDisplayRegion(3, SYSMETRIC(9), this.Width + 1, this.Height + SYSMETRIC(9) - 13) ENDIF ENDPROC PROCEDURE SetDisplayRegion(tnX1, tnY1, tnX2, tnY2) DECLARE INTEGER DeleteObject IN gdi32 INTEGER hObject DECLARE INTEGER CreateRectRgn IN gdi32; INTEGER X1, INTEGER Y1, INTEGER X2, INTEGER Y2 DECLARE INTEGER SetWindowRgn IN user32 ; INTEGER HWND, INTEGER hRgn , INTEGER bRedraw RegiondeLinea = CreateRectRgn(tnX1, tnY1, tnX2, tnY2) SetWindowRgn(This.Hwnd, RegiondeLinea, 1) DeleteObject(RegiondeLinea) ENDPROC ENDDEFINE DEFINE CLASS ExitButton as CommandButton Caption = "Exit Toolbar" FontSize = 8 * updated to reflect parent container PROCEDURE Click this.Parent.Parent.Release() ENDPROC ENDDEFINEThe only thing I can't figure out how to do is get rid of the toolbar's margins. In the example above, I cheated by hiding the top, left and right margins outside the visible area of the display. But I still have that damn bottom margin. I tried fiddling with your SetDisplayRegion code, but failed to have any luck.