You can add an instance of your toolbar to the form only if the form is a top level form and toolbar ShowWindow property is 2.
Firs, add a custom property to the form, ToolbarRef with .null. value
Here is some sample code (in Activate event of form) :
IF ISNULL(this.toolbarref)
this.ToolbarRef=CREATEOBJECT('MyToolbar')
this.ToolbarRef.Dock(0)
this.ToolbarRef.visible = .t.
ENDIF
>Hi all,
>
>I have this app that has a form and it's own toolbar. Now from the windows point of view, this is just right. From the Clients POV this is a mouse nightmare.
>
>I would like to keep the current functionality intact, allow the user to Yes a flag in the preferences. On Yes of the flag the toolbar though appearing as it should, should also create a copy/instance of itself onto the form say at the bottom of the form.
>
>Is this possible? I can copy/paste buttons onto the form and hide them as and when, but what when I modify the toolbar buttons, rework? nah!, or what each form has a different toolbar??