How to minimize program and restore the program in Pocket PC ?

A

A_PK

Hi

How can I minimize a pocket pc program ?
Is it just set the MinimizeBox = True.

How can I restore back a minimize pocket pc program ?
What I want is when i go the application icon, click on the icon, the
minimized pocket pc program will be restored back.
I dun wnat to open a new application, i want to restore back the minimized
pocket pc program.

thank you very much
 
G

Guest

That's default behavior in Pocket PC. You don't have to do anything to get
it to do that - in fact getting different behavior is not so simple.

-Chris
 
A

A_PK

well...

i want the user to click the minimize button on the top right corner
there...
then my application will minize, then the user is allow to do other task

when the user wish to return to my application, the user just need to click
the program icon under "Program" there.....

then will return to my application.

I do not want to close my application, cos i will need to reload my
application again.
So I am thinking to minize my application, when the user feel free to return
my application. the user just click the return my application.

i hope someone could guide me
thank you very much
 
S

Shannon Lloyd

A_PK said:
well...

i want the user to click the minimize button on the top right corner
there...
then my application will minize, then the user is allow to do other task

when the user wish to return to my application, the user just need to click
the program icon under "Program" there.....

then will return to my application.

I do not want to close my application, cos i will need to reload my
application again.
So I am thinking to minize my application, when the user feel free to return
my application. the user just click the return my application.

i hope someone could guide me
thank you very much

As Chris already pointed out to you, PPC programs do not shut down when
you close them via the X button. They merely get minimised. If you want
them to close down completely, change the MinimizeBox property to false.
You'll notice that the X changes to "OK" when you do this. The default
value for this property is true, so your application WILL NOT SHUT DOWN
when you click the X button. When the user attempts to restart your
application via the program icon, the same process will be restored. In
short, *you do not have to do anything to achieve this behaviour*.
Shannon
 
A

A_PK

Hi all,

my applicaiton consist of 5 forms....

1 form is the Main_Menu

3 forms is the product, customer, and order form. these 3 forms will have
the OK button with "e.Cancel = true", and set "Me.hide" to hide the form
when the users have done their jobs, and call back the "Main_Menu.show" in
order to display the main menu.

1 form is the LOCK Screen form which is able to let users to lock their
program. so when the users want to do other task, they can simply just lock
the screen by minimize the program, and they can go to do other things.
Once, they want to return to the application, they just simply click the
program icon, they will return back to the LOCK screen. once the user enter
the correct password, then the lock screen will hide and show the Main Menu
again.

Now my problem is.....if my application only got 1 form, then is it easy to
do. I just click the X button, then my application will be minimized. if i
want to return i just click the program icon again, the the Lock Screen will
be displayed, and prompty me password to unlock the application.

Now since i got 5 forms. when i go to LOCK screen, I click the X button. my
application will be minized as well. but when i click the program icon. My
application will not return to the LOCK Screen. it will automatically go to
other forms. ( sometimes customer form, sometimes product forms, sometimes
is lock screen, sometimes is Main Menu). i just wonder how could I let my
minimized application restore to the Lock Screen.....

if Minimized application, restore the Lock Screen

if Launch application, then go the Main Menu

Regards
Pierce
 
G

Guest

Ah, so it's more complex than your original question. Would've helped had
you stated that in the first place. In the Activate event of each Form
you'll have to add logic to show your "Lock" screen.

-Chris
 
G

Guest

I thought I had. In the Activate event for each Form, you need to show the
"lock" screen. Probably modally.

-Chris
 
A

A_PK

i got what u mean....but I dun know how to write the coding.

i decalare all the FORMs under a global module
under the Activated Event of each form, i tried to call the flock.show (Lock
Form screem), but I am getting problem...saying object null references....

but in other button event or others....
i do not have problem calling flock.show
pls guide me ....

i set a var, when the user min the Lock Form screen, then var will be 1
so under all Activated Form even...i wrote a IF statement....
if var = 1 then
flock.show
end if

please guide me if the above logic correct ?
and also pls advise what is the problem I am facing ? object null refercens
?

thank you veyr much

Regards
pierce
 
J

Jim Cooper

That's default behavior in Pocket PC.

Actually, not always. I have the same problem. Simple applications with
only one form showing work as expected.

But I have tried embedding forms inside a main form in order to get rid
of that annoying flickering that happens when changing forms. When I do
that, clicking on the icon again does nothing.


Cheers,
Jim Cooper

__________________________________________

Jim Cooper (e-mail address removed)
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________
 
J

Jim Cooper

Further investigation shows that neither the main form nor the embedded
form gets an Activated event. Sounds like a bug in either the CF or the
OS. Activating the app from the list of running apps works, fine, BTW

Cheers,
Jim Cooper

__________________________________________

Jim Cooper (e-mail address removed)
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________
 
C

Chris Tacke, eMVP

Actually, not always.

Yes, always. The default behavior *is* to always pass control to an existing
instance, not to create a new instance. It's also supposed to bring that
instance to the fore, which is where you're having the issue.
But I have tried embedding forms inside a main form in order to get rid of
that annoying flickering that happens when changing forms. When I do that,
clicking on the icon again does nothing.

Form flickering is reminicent of an early bug. Have you tried the latest
SPs? If clicking again does nothing it's likely becasue the system thinks
it's already in the fore. Probably a painting issue.
Further investigation shows that neither the main form nor the embedded
form gets an Activated event. Sounds like a bug in either the CF or the
OS.

Does the form get any event? How is it being showm (normal or modal)?
Activating the app from the list of running apps works, fine, BTW

That's becasue it's just brining the app to the fore. You can manually
P/Invoke and get the same behavior if you can find an event that occurs when
the app gets focus.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
J

Jim Cooper

Yes, always.

Nup, not always :)
Form flickering is reminicent of an early bug. Have you tried the latest
SPs?

Yes, SP3 fixes it, but before then I was using the form embedding
technique. However that brings this other problem to the surface. I
don't have to use that technique now, but there are other times you
might want to embed a form inside a control (eg to make forms containing
page controls more manageable).

The OP seemed to have the same problem when his app was minimised with 2
forms showing, so I thought it was likely the same issue.
Does the form get any event?

Nope. No forms get any events, AFAICT
How is it being showm (normal or modal)?

Before it's minimised, it's being shown nonmodal (ie with Show() )
That's becasue it's just brining the app to the fore. You can manually
P/Invoke and get the same behavior if you can find an event that occurs when
the app gets focus.

I still think it's a bug in either the CF or the OS :) It *should*
work, but it doesn't.

Cheers,
Jim Cooper

__________________________________________

Jim Cooper (e-mail address removed)
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________
 
G

Guest

Hi,

I can confirm Jim's problem (on two devices running PPC2003).

Here's my situation:
1) I have a (single-form) MFC application for Pocket PC
2) When I launch my application the first time, everything's cool.
3) I close the app with the close button ("X"), the main window
hides/minimizes.
4) Now, If I launch the application a second time (tap the exe in File
Explorer), it doesn't get activated. What happens instead is, File Explorer
loses the focus, but the application main window doesn't appear. If I click
the application exe a second time, the title bar text turns to "Default
Ime", but still no main window.

Interestingly, activating the application via System / Settings / Memory /
Running applications works.

Remote Spy++ only showed messages up to (and including) item 3. The
application apparently didn't receive any messages after that.

Karl

--
Karl Traunmüller, CEO
Intumi Software
www.intumi.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top