Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modal form lost focus and die
Message
De
04/03/2003 14:42:33
 
 
À
04/03/2003 12:25:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00760474
Message ID:
00761102
Vues:
31
>How about something like:

>* timer() method
>if _screen.activeform.windowtype = 0
> ThisForm.Command1.SetFocus()
>endif

:-))))))))))))))))))))))

Yesterday I wrote about it too.
I repeating the text from that thread :

--------------

Ha-ha-ha! Welcome to FoxPro! It does not work!

On couples of my forms I have a visual OCX controls (drawing graphs). What is the _VFP.activeform if one of that forms is activated? No, not form, but OCX control!!!

_VFP.activeform.Name = "oleFlowRateGraph"
_VFP.activeform.windowtype = ... ERROR, Crash ...


> but you "can" (but should not) inadvertantly setfocus to any object
> on another form when the active form is modal

It makes me sad, but out of my control :-(((

Fisrt of all, the program is old and big, and I can not redig all codes and remove all SetFocus() call from everywhere and be sure that it will work.

And second, our customers often have an IT department, that have a ability to write some special codes on events, specified in our system. (I will not dig in to save our time). I can not tell everybody : "Never use SetFocus() - it will crash our product!".

--------------
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform