>I would like to know how to get WindowState by API from his hwnd
Use the GetWindowPlacement() function. You need to pass it a structure, some of which you won't know the size of. Does not matter, though, because you're only interested in the third part of the structure, which is a UINT (integer in VFP).
Here's a KB article that shows you how to pass and decipher structures.
By the way, for future reference, do not always assume that addressing a message to me means I'll see it anytime soon. I'm pretty swamped right now, and my UT reading goes in spurts. Not that I necessarily mind, I just do not want to disappoint anyone if takes two days for me to get around to reading it. Besides, you've got plenty of folks here that are just as competent with this stuff as I am.
Mike Stewart