This site is no longer active and is available for archival purposes only. Registration and login is disabled.

background app sleeping


background app sleeping

Postby fast_rx » Apr 10, 2004 @ 5:50am

I've created an program that starts a new thread that sleeps for 60,000 milliseconds then the app calls ShowWindow(SW_HIDE).

When the time elapses in the new thread, it grabs the current screen buffer and melts it... yes, more or less a practical joke...

I used the extra thread because using pocketfrog, the application is pretty much suspended. And I want it to be as little load on the system as possible.

But the thing is, it causes my game and others to stutter really badly. Other. What, if anything, am I doing wrong? Is there another way to suspend and wake up your app at a later time?
Attachments

[The extension jpg has been deactivated and can no longer be displayed.]

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Dan East » Apr 10, 2004 @ 10:15am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby fast_rx » Apr 10, 2004 @ 4:08pm

Conan, can you assume a new thread will just default to THREAD_PRIORITY_NORMAL? That's what I was doing, but the problem turned out to not be the new thread at all.

It's the way pocketfrog suspends itself... which was fixed by adding a sleep statement.

I'll post this issue and the fix in the pocketfrog forum under the thread if anyone is interested.
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Dave Johnston » Apr 10, 2004 @ 5:01pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby sponge » Apr 10, 2004 @ 5:03pm

holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum