Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GotFocus/Activate not firing for form.
Message
De
26/04/2005 11:16:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
GotFocus/Activate not firing for form.
Divers
Thread ID:
01008482
Message ID:
01008482
Vues:
67
Hey all,

I have a couple forms that I want to always display in tandem. They are each free, top-level forms, comprising an image viewer tool that we display from many other apps. In other words, showing the windows in-screen is not an option, as our main screen (where they are called from) would clip them.

But when one form of the image viewing is brought to the front, I want the other form to come forward too. One form is the treeview displaying image groups, and the other form is the image viewer. The forms need to be separate because the image viewer needs to have the ability to be resized, zoomed, etc. Things also need to be flexible, since our user environments range from 800x600 geometry all the way up to 1600x1200. I don't want to force a certain size for the image viewer, nor can I show the image in same form as the tree view.

I thought by placing code in the Activate, GotFocus, or Show events in the image viewer that I could force the treeview form to come to the fore as well. The forward movement is being done with the Show() method as well as the Windows API BringWindowToFront() function. That isn't the problem. The problem is that when a different Windows app (like an Explorer window) is in front of the image viewer VFP form, clicking on the image viewer to bring it to front does NOT fire the GotFocus, nor the Activate, nor the Show event. I am eventless! *smile*

Those events fire fine if I am coming from the companion VFP form, but I want the VFP stuff to come to front even when coming from completely separate Windows apps. Do I have to resort to MouseMove, etc. to trap when the form is brought forth? That seems a bit much. Why won't any events fire when the form gets focus away from a different Windows app? What event should I be trapping for?

Thanks,
JoeK
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform