Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 - Toolbars & Toolbar Icon Problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00155593
Message ID:
00155843
Vues:
25
Michel, using VFP5 there is no any reason to use formsets for toolbar. You can 'edit' toolbar visually in class designer, and then instanciate it in run-time.
Maybe I just misunderstand your problem.

>Bruce,
>
>I can do that too. However, I have a different requirement. See below the response I gave someone else. I would be interested if when you try to do
>the same, you too get the same FILE IN USE error.
>
>Michel.
>
>Richard,
>
>I can do that too and it works. Problem is I need to be able to visually
>edit my
>toolbar. The way I do it, and you might be interested in it given
>your point about formsets (which I do not like much too), is I create
>a toolbar class, then go to TOOLS / OPTIONS / FORMS and temporarily
>make that toolbar class my default form class. I then do a NEW /
>FORM which uses that Toolbar class. This way I do not have to add it
>to a form set, I can have it on its own. I then go back to TOOLS /
>OPTIONS / FORMS and put the default form class to our in-house
>default form class. I use this method a lot to get around the formset
>problem.
>
>I have a feeling, however, that I have hit a VFP5 bug where toolbars,
>any toolbar, remain in memory regardless of any RELEASE, CANCEL,
>etc..., that you may have done. From my observations and
>experimentation I am pretty
>convinced that FoxPro does that with the VFP toolbars anyway, and I
>would not be surprised if it does that with ANY KIND of toolbar, hence
>the FILE IN USE problem that I get.
>
>Michel.
>
>================ Your original message follows ================
>
>Monday, 9 November 1998 14:35, you wrote:
>
>>I am not quite sure why you are asking. Basically I have created a
>>Toolbar class. I then create a form based on that Toolbar, and as
>>part of the development/testing process I modify one or two things,
>>run the toolbar, then I want to modify a few more things and .....
>>bang .... I get "FILE IS IN USE" when I do the MODIFY FORM to do
>>the modifications.
>
>The way I have use toolbars is 'create' a toolbar object (like oTlb =
>CREATEOBJECT("MyToolbar"), first declare oTlb public) followed by a
>oTlb.Dock(0) and a oTlb.Show() command. Never had any problems with it like
>that: variable goes out of scope, toolbar = gone.
>
>While it is possible to drag-drop a toolbar class from the projectmanager
>onto an existing form, this requires a formset, and I just hate formsets
>(and I truly believe they hate me).
>
>Richard
>daniels@bart.nl
>
>PS. File is in use is a sure sign something is wrong, it is not just there
>to annoy you. It could cause memory errors and even prevent VFP from closing
>properly!
>
>
>*//////////////////////////////
>FoxShare Mailing List. Information at
>http://www.hourglassconsulting.com/whyted
>whyted@hourglassconsulting.com
>*//////////////////////////////
>
>==================== Your original message follows =====================
>
>>Hi Michel.
>>When I use a tool bar, I create it as required in the main app using a property of main app to store the reference as this.oformbar=CreateObject(mytoolbar). I can then refer to buttons on the formbar from anywhere as MainApp.ofrombar.abutton.click for example. When I no longer need the formbar I set it to NULL (this.oformbar=.NULL.) and that gets rid of it. You might want to try something similar. HTH
>>
>>Glad you found the problem with your BMP's
>>
>>>Hi All,
>>>
>>>VFP 5.0a SP3 - Playing around with toolbars and icons.
>>>
>>>Toolbar Problem
>>>---------------
>>>If I create a Toolbar class, and then create a form based on that
>>>class ..... everything works. I can hide the toolbar, show it ....
>>>but : how do I clear it from memory completely ? Releasing the
>>>object memory variable attached to it does not seem to do the trick as
>>>if I try to MODIFY FORM I get "File is in use". CLEAR ALL, CLOSE
>>>ALL, RELEASE ALL, none of those work, I still get the "File in use
>>>error" when trying to MODIFY FORM my toolbar form. The only
>>>solution I have found so far is shutdown VFP and restart it.
>>>
>>>Normal forms have a RELEASE EVENT but Toolbars do not have anything
>>>equivalent, so I am stuck for the moment.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform