_SCREEN.AddProperty("oToolBar") _SCREEN.oToolBar = NEWOBJECT('mytoolbar','mylib.vcx')As you can see I changed the name of the toolbar.
LOCAL ShapeID ShapeID = "" SELECT localcrime1 Scan For Alltrim(crimetype) <> "Vandalism" ShapeID = localcrime1.shapename Thisform.Grove.RemoveObject(ShapeID) ENDSCAN this.mytoolbar.hide() >/PRE> The name of the form is 'Grove'. There needs to be a referrence to the form so that the code can act on the form's image and remove the unwanted objects, but I haven't had success yet. I can get the code to remove the objects if I run it within the forms methods, but as soon as I run it from the toolbar it won't even recognize the shape's names. How is this done? Grady --------------------------------------- >>>Okay - I don't know how to do this and I've beaten on my code and VFP help long enough. Please show me how? >>> >>> >>>>oToolbar needs to be a property of _SCREEN, not a form. >>>> >>>>>I added the code below to the mouse middleclick method of the form's image/pic. Here is the code I used: >>>>><PRE> >>>>>LOCAL oToolBar >>>>>oToolBar = NewObject('showonly','mylib.vcx') >>>>>oToolBar.Show( ) >>>>>>>>>>When I middle click on the form's image(its a map), I can see the class flash and then disappear on the map image. How do I get it to show and stay on the image?
_SCREEN.AddProperty("oToolBar") >>_SCREEN.oToolBar = NEWOBJECT('showonly','mylib.vcx')>
>_screen.AddObject('oToolbar','mylib.vcx')