Form Visible? In Focus?

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?
 

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?
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. :)
 

Mr_Gee

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?
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 :)
 
Top