Public ox ox = CreateObject("Form1") ox.Show() Define class form1 as form oTlb = NULL ShowWindow = 2 Procedure Activate If IsNull(This.oTlb) This.oTlb = NewObject("Toolbar1") This.oTlb.HandleResize(This) This.oTlb.Show() This.oTlb.Dock(0) EndIf EndProc Procedure Resize If not IsNull(This.oTlb) This.oTlb.HandleResize(This) EndIf EndProc EndDefine Define Class Toolbar1 as Toolbar ShowWindow = 1 Add Object cnt as Container with BackColor = Rgb(255,0,0), Height = 25 Procedure HandleResize( toForm ) This.cnt.Width = m.toForm.Width - 25 EndProc EndDefine