Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hi Jim,
Yes, I thought something like this was happening. The puzzle to me is that it works perfectly if a previous modal form has not run, once my 'options' form runs and options are accepted, the non-modal form won't retain focus. As I want to use this overlay window in many places I guess I could pass a parameter which would contain a the name of the procedure to run, and macro substitute it in the textbox Gotfocus event as you suggest.
David
>David,
>
>A non-modal form does not pause for code to continue. If you ahve two "always-on-top" fomrs the one with focus will be on top. The non-modal form is not holding focus and therefore the main form regains focus and it comes to the top.
>
>The trick I use to do an operation with a message form like this is to place a textbox in the non-modal form at tab position 1. In the Gotfocus of that textbox I put the code to run the operation and end that code with a Thisform.Release(). Then when I want the operation I simply DO FORM MyForm and let it go.
Précédent
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