H
Hilton
Hi,
Running CF 1.0:
If I leave the GPS thread running, it drains the battery. So, I need to
turn it on and off at the appropriate times. If I turn it on/off when
opening specific forms, it takes a few seconds to get up and running which I
don't really like. So, I'd like to start the thread when the app is
maximized (normal) and stop the thread when the app is minimized or closed.
But how do I detect when the app gets minimized? FormWindowState only has
Normal and Maximized, not Minimized. I tried IsWindowVisible(IntPtr hWnd)
but that always returned true.
If this is not the best strategy (or possible), what else can you suggest to
turn start/stop the GPS thread at the appropriate times?
Thanks,
Hilton
Running CF 1.0:
If I leave the GPS thread running, it drains the battery. So, I need to
turn it on and off at the appropriate times. If I turn it on/off when
opening specific forms, it takes a few seconds to get up and running which I
don't really like. So, I'd like to start the thread when the app is
maximized (normal) and stop the thread when the app is minimized or closed.
But how do I detect when the app gets minimized? FormWindowState only has
Normal and Maximized, not Minimized. I tried IsWindowVisible(IntPtr hWnd)
but that always returned true.
If this is not the best strategy (or possible), what else can you suggest to
turn start/stop the GPS thread at the appropriate times?
Thanks,
Hilton