Form Visible? In Focus?

Discussion in 'Questions (Windows Mobile)' started by digitaldon37, Dec 2, 2008.

  1. digitaldon37

    digitaldon37 Active Member Licensed User

    I'm looking for a property that I can view to see whether a form is visible or not.

    I have an application (Pocket Forecast) that can be configured to get an update and refresh the screen. The problem is that if the program is minimized that I don't want to refresh the screen (but I want to continue getting updates). The application can be maximized by other programs such as Task Manager.

    The only way I can think of is to check to see whether the form is in focus or is visible, and if it isn't then not to update the screen.

    Is there a way to do this?
  2. digitaldon37

    digitaldon37 Active Member Licensed User

    I found the Form property "WindowState" (implemented via the Door library) but it didn't work for what was needing, since I am using the hardware library function ShowToday. It did work on the PC version since it was being minimized through the minimize button (set the state to "Minimized") but since I was using ShowToday the WindowState returned "Normal" on the PDA.

    So I found the answer to my question, although it didn't fix my problem. And I hadn't noticed that Klaus had added some code that was exactly what I needed - I should have looked more closely in the first place. :)
  3. Mr_Gee

    Mr_Gee Active Member Licensed User

    Agraham wrote another great lib, System state, which can tell you
    which application has focus/is active
    as long as the "active != Pocket Forecast" you don't have to update the screen :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice