>>>Each time I select a form from my application's menu, a copy (or additional copy) is displayed on my screen. My menu commands for each form in the system look like "do form FormName"
>>>
>>>Instead, I want a form selection from the menu to set the focus to the running copy (if a copy is currently running), or to start a new copy of the particular form if it is not currently running. I don't want two copies of the same form running at the same time. How do I accomplish this?
>>>
>>>Bob Cassady
>
>
>>In order to do that you must first check if your form is not already on screen. You can do that by scanning the _SCREEN.Forms collection.
>>
>>Vlad
>>
>
>
>Great approach Vlad. Thanks, it works fine.
>
>The only outstanding problem I have now is figuring out how to programatically make MyForm the active form when MyForm is selected from the menu, is already on the screen, but is not currently the active form.
>
>Bob
LOCAL oForm
FOR EACH oForm IN _SCREEN.Forms
IF oForm.Name == "MyForm"
EXIT
ENDIF
ENDFOR
oForm.Activate()
Vlad
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