Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Showing a Form

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2009, 02:32 PM
Knows the basics
 
Join Date: Dec 2008
Posts: 77
Awards Showcase
Beta Tester 
Total Awards: 1
Default Showing a Form

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


Thanks,
E
Reply With Quote
  #2 (permalink)  
Old 03-06-2009, 03:16 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
Is it possible, on the device, to run an app that's already running?
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.

Quote:
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
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.
Reply With Quote
  #3 (permalink)  
Old 03-14-2009, 10:38 AM
Knows the basics
 
Join Date: Dec 2008
Posts: 77
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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

Quote:
Originally Posted by Erel View Post
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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open form not showing unless minimize first? tsteward Questions (Windows Mobile) 11 02-24-2009 08:43 AM
Showing time in textbox ??? Basseman Questions (Windows Mobile) 14 01-11-2009 04:03 PM
Showing a form in a SelectionChanged event specci48 Questions (Windows Mobile) 3 05-18-2007 02:05 PM


All times are GMT. The time now is 04:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0