Information générale
Catégorie:
Gestionnaire d'écran & Écrans
> 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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement