Showing a Form

Discussion in 'Questions (Windows Mobile)' started by eww245, Mar 6, 2009.

  1. eww245

    eww245 Member Licensed User

    Is it possible, on the device, to run an app that's already running?

    I would like to set it in the background and then show the form after a command arg starts it back up.
    It will only work in the IDE, and complied with a timer set to show the form after hidden.

    Also, is there a way to run code triggered by an event wakeup, with the program already running?
    I'd like images to update after it wakes up.
    I've searched for some code to write a library, but can't find anything other than RunAppAtEvent

  2. Erel

    Erel Administrator Staff Member Licensed User

    When you launch a program that already runs, this program will become active and visible. So I think that this default behavior is exactly what you need.

    One possible solution is to use a timer with an interval of about 5 seconds. On each tick compare the current value to the previous one (which was saved in a global variable). If the difference is larger than something like 10 seconds you know that the device was waked up.
  3. eww245

    eww245 Member Licensed User

    Thanks Erel

    After some testing I am able to detect that the device woke up.
    I got the time down to 100ms and it's pretty accurate on updating the form.

    Sometimes it doesn't work at all, I'm guessing because of the current state of my app.
    Not a problem, it will get updated in other ways afterwards.

    Thanks Again

  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