>>Looks fine. Tell me, however, are you just trying to get the window handle of the _SCREEN? If so, there may be a better (less code) way.
>
>I needed handles to Forms in _SCREEN.
Gerry,
You might want to ignore my previous. If you're using MainhWnd(), then you're using Foxtools. In order to get the window handle of a given form, all you need are the functions I mentioned in the other post: _WhTohWnd() and _WFindTitl(). You mentioned that you use an underscore in to indicate a custom property. In keeping with that, the following, in a form's Init event will store its window handle to h_window:
This.h_window = _WhTohWnd(_WFindTitl(This.Caption))
The only thing you need to be careful of are forms with the same caption. This will cause the wrong value to be store in occurrences of the form after the first one. If that's a possibility, then an API based solution might be required.
George
Ubi caritas et amor, deus ibi est