Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modal form lost focus and die
Message
De
03/03/2003 19:33:01
 
 
À
03/03/2003 18:49:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00760474
Message ID:
00760649
Vues:
18
> Pardon me for jumping in

Welcome to our swamp :-)

>Setting focus to another form with a timer or otherwise when the active
>form is modal causes the (previously) active modal form to become
>inaccessible thereby locking up your application.

EXACTLY! It's exactly a my problem!

> *!* in timer event on Non-modal form
> if _VFP.activeform.windowtype <> 1 or _VFP.activeform = thisform
> thisform.Command1.setfocus()
> endif

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 ...


> Whether it is a bug in Visual FoxPro or not, I can't say

I can. BUG.

> 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!".

Hm, I'm in trouble, ah?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform