Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop class on form and execute code
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00463901
Message ID:
00464593
Vues:
15
One more note:
Together with "set procedure" command to make hood routine accessible you require to use 'set classlib' command to the class library with classes that contain such tricky functionality. Without 'SET classlib' this will not always work.

>Hi!
>
>I know answer, but it could be organized by some weird tricky way.
>I made following:
>
>procedure DesignHook
>lparameters poObject
>= messagebox("Hello!")
>return ""
>
>
>Than made a label class. In the Tag property instead of usual value I put following:
>= DesignHook(this)
>When you use 'set procedure to' command to setup above code in procedure to be always accessable,
>DesignHook will be ran each time you place such control to form. You can use also thisform to reference a form design object. It is quite intereting and I was very confused what is hidden after thisform object in design time, specially when you edit class? (thisform returns correct reference into hook procedure when you edit above class and use described way). Is this a reference to a wrapper form that contains edited class? I never investigated these questions so deep, but at least you have an easy way to run a code for new placed control and even pass a reference to the objects into it.
>
>>>I read all the thread and at End I understand what you want.
>>>In Tools/Options/Forms you can activate Builder Lock and Create a Builder and Register it in VFP and allways you insert the class
>>>the Builder will Start
>>>
>>>I don't know how to do it but you can Investigate how to do.
>>>
>>>I hope this help
>>
>>Yes, Christof Lange told me about the builder lock. That, however, is a little too much. It forces ALL builders to be executed, but what I really want is some code to execute when this specific class is dropped on a form, not when ANY class is dropped on a form.
>>
>>Thanks for the suggestion!
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform