Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the easiest way to get Window handle value?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00051377
Message ID:
00052094
Vues:
63
>>>As a side note, I previously tried retrieving the window handle using the GetTopWindow API call in the form's Activate event. Surprisingly, the window handles for the two elements of the array were identical. I'd like someone to explain that one to me.
>>
>>If the handles are the same, they are both for the same window (different windows have always different handles). In this case (probably) when the Activate event occurs, the window is not "on top" yet. So, the handle is not for the current form.
>>
>>Vlad
>
>Vlad,
>
>That was my thought as well, so I moved the assignment statement to the .GotFocus event of the command button. Didn't make a difference. I would think that not only would the window being on top, but active as well, before this event would fire. Any ideas you have in this area would be appreciated.
>
>George

Try to put a button on the form and move the code that takes the handle in the Click of this button. In this way, you know for sure that the form is on top when you get the handle. Of course, this is just for testing purposes, not for a real program when it might not work with a button.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform