Need to get the guaranteed HWND on startup of a form

Posted on 2010-01-07
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

    What version are you using?

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

    Author Comment

    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

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    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://msd…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now