Need to get the guaranteed HWND on startup of a form

Posted on 2010-01-07
Medium Priority
Last Modified: 2012-06-27
I need a good insured method of getting the hwnd of a form when it starts up. I have tried the init, and activate event, but they do not seem reliable. When I query the hwnd of the form after what the init wants to say it is sometimes it is the last window that had the focus in windows. FoxPro seems to get this value too fast sometimes I guess.
Question by:busycoder
LVL 27

Accepted Solution

CaptainCyril earned 2000 total points
ID: 26207187
What version are you using?

Thisform.hWnd does not work for you? The Activate is the ideal place for it.

Author Comment

ID: 26207539
You know what? I was trying to do this through windows API and forgot all about the form even HAVING an HWND property. Egg on my face! Easy points for the cyril!!!!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Screencast - Getting to Know the Pipeline
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question