Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop class on form and execute code
Message
De
17/01/2001 16:51:44
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00463901
Message ID:
00464918
Vues:
12
>>One time probably won't cause me any problems as I really will only have one instance of this control on a form. I'm not 100% positive I'll even have this as a control that needs to be dropped on a form, but that's the way I'm currently leaning.
>
>Hi, Fred.
>
>Just remembered a clunky solution we used some time ago. What we needed at the time was to be sure that some properties were set after dropping the control.
>
>This control was a container that had a special functionality but problem was that most things worked well just dropping it on the form, but if you forgot to set a couple properties, you should found problems later (it was a design problem, obviously, but not very easy to change).
>
>Then on of our local Einstein discovered that the simplest way to be sure that anyone using it remember to set the damned properties was putting a label (invisible at runtime) in Arial, 14, bold and red that said "HAVE YOU SET THE X, Y, and Z PROPS?".
>
>Of course, they changed the label back saying "I DID, I DID!" after setting it right. I laughed a lot when I saw what they did, but... well, it served it purpose!
>
>Anyway, I think Vlad's idea is promising.
>
>Good luck!

I've used similar messages in the past. < g >

There's a couple of gotchas with Vlad's idea, but I think I can get what I need out of it.

It only fires for the first control.
It fires at runtime (if it's the first execution of the object).
Similar to the first problem, it doesn't fire for dropping the control on multiple forms, either.

This last one may be the killer.

Anybody got a way to identify design time vs. run time?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform