>Hi All,
>
>If two separate forms happens to be using the same toolbar. How can I check to see if the toolbar exist or not before docking it underneath main menu?
>Currently, I have a main form which I set as the top level form, the rest of the forms are set to Model and in top level form. Some forms have the navigation keys toolbar and some don't. If I run forms which have the toolbar, the toolbar will appear n number of times. How can I prevent the toolbar from docking more than once and allow other forms to use the same toolbar? Thanks
You always can use type function
Like this
if type('tlb')!='O'
public tlb
tlb=createobject('tlbr')
endif
You can keep some properties in the forms to use them to throw out somebuttons from tollbar
For example in the form load
if type('tlb')='O'
tlb.setall('visible','t','btn)
endif
if not this.skipnext and type('tlb')=O'
tlb.nextbut.visible=.f.
endif
MVP-2006-2011, PHD in Math and Physics ,
host of
www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.