Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-08

Does Anybody Know how to REALLY kill an App on Pocket Pc?

12 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

epergola

Hi

I have done a lot of research but couldn't find a solution. I have an app that runs on a PDA and takes (must take) the whole screen. When the user presses the Terminate button, the main window of the app remains visible (and I read the app actually remains in memory). Is it possible to really terminate the app, i.e. remove it form window, and actually
remove the main window?
Thanks

View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25107234.html Sent from the Free Pascal - General mailing list .

Reply by email

Henry Vermaak
to epergola

2009/8/23 epergola :

Show quoted text 10 lines
Hi I have done a lot of research but couldn't find a solution. I have an app that runs on a PDA and takes (must take) the whole screen. When the user presses the Terminate button, the main window of the app remains visible (and I read the app actually remains in memory). Is it possible to really terminate the app, i.e. remove it form window, and actually remove the main window?

Maybe this helps:

http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes#The_Title_.22OK.22_and_.22X.22_buttons

Henry

Reply by email

epergola
to epergola: Hi I have done a lot of research but couldn't find a solution. I have an app that runs on…

Thanks Henry.
But my main form is full screen: no title bar, no task bar. I have a custom'Terminate' button that on click does this: MainForm.Close.
I want the form to be closed (NOT appearing on the background), and the Application
actually terminated 'destroyed' or 'killed'.
On the page you referred me to I found:
The "OK" button will send a WM_COMMAND message, which is handled on wincecallback.inc, with wID=IDOK. There we respond by throwing a WM_CLOSE to the form.

Ok, do you know then how can I programmatically send a WM_COMMAND and 'throw'
a WM_CLOSE (assuming this actually terminates the app)? Which unit should I use?

View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25108463.html Sent from the Free Pascal - General mailing list .

Reply by email

amir
to epergola

why don't you use "Application.Terminate;"?

epergola wrote 18 lines
Thanks Henry. But my main form is full screen: no title bar, no task bar. I have a custom'Terminate' button that on click does this: MainForm.Close. I want the form to be closed (NOT appearing on the background), and the Application actually terminated 'destroyed' or 'killed'. On the page you referred me to I found: The "OK" button will send a WM_COMMAND message, which is handled on wincecallback.inc, with wID=IDOK. There we respond by throwing a WM_CLOSE to the form. Ok, do you know then how can I programmatically send a WM_COMMAND and 'throw' a WM_CLOSE (assuming this actually terminates the app)? Which unit should I use?

Reply by email

epergola
to Felipe Monteiro de Carvalho

Yes I could. But where and how would 'publish' it? can I zip the source, use 'Reply' and then 'Upload File' when n replying?

Felipe Monteiro de Carvalho wrote 10 lines
Can you publish a test application somewhere demonstrating the problem? -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25120281.html Sent from the Free Pascal - General mailing list .

Reply by email

epergola
to epergola

Trying to upload the test files.....
Sent them wherever "Upload File" puts them..

http://www.nabble.com/file/p25120976/fpctest.rar fpctest.rar

epergola wrote 18 lines
Yes I could. But where and how would 'publish' it? can I zip the source, use 'Reply' and then 'Upload File' when n replying? Felipe Monteiro de Carvalho wrote: > > Can you publish a test application somewhere demonstrating the problem? > > -- > Felipe Monteiro de Carvalho > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > >
View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25120976.html Sent from the Free Pascal - General mailing list .

Reply by email

Felipe Monteiro de Carvalho
to epergola

Was trivial to solve, you are not turning off the full screen mode before shutting the application down, so the upper panels are not painted and the old painting remains. The application is either way really closed, but because you shut down the panels, nothing shows up to cover the old paint.

Just add this to the end of your unit:

finalization
  resetpda(true);

And any of the close method ( Self.Close or Application.Terminate) will work properly

Felipe Monteiro de Carvalho

Reply by email

epergola
to Felipe Monteiro de Carvalho

Felipe thanks very much!
Since you are *the* man for arm dev in fpc (as I read), could you please take a look at the
previous post "Status of SipShowIM (software keyboard)?". More than SipShoiwIM, I would like to know how to ensure that the Findwindow/Showwindow
keep the keyboard hidden for the duration of the App. Now, the resetpda on FormCreate of Main form hides it. It is kept hidden when I call Form2.showmodal in Main Form. But when I close Form 2, the keyboard re-appears on top of MainForm! (you can move resetpda from FormActivate to FormCreate, then run the test code
I sent previously to reproduce the problem).
Thanks

Felipe Monteiro de Carvalho wrote 22 lines
Was trivial to solve, you are not turning off the full screen mode before shutting the application down, so the upper panels are not painted and the old painting remains. The application is either way really closed, but because you shut down the panels, nothing shows up to cover the old paint. Just add this to the end of your unit: finalization resetpda(true); And any of the close method ( Self.Close or Application.Terminate) will work properly -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25137766.html Sent from the Free Pascal - General mailing list .

Reply by email

Felipe Monteiro de Carvalho
to epergola

LCL-wince does not activate the keyboard upon closing a modal form, Windows CE does this alone and I dont know if this can be prevented.

Why dont you just call resetpda in OnActivate? (or both OnCreate and OnActivate)

Felipe Monteiro de Carvalho

Reply by email

epergola
to Felipe Monteiro de Carvalho

Felipe
thanks, but i found the perfect solution, I think. Actually the indo ia from lyh1 in a post in Lazarus forum (titled 'FullScreen Application').
If in resetpda I use
hkeyboard:=FindWindow('menu_worker','');
instead of
hkeyboard:=FindWindow('MS_SIPBUTTON','MS_SIPBUTTON'); it works like a charm.
Calling resetpda(false) in MainForm.FormCreate and resetpda(true) in in Finalization of MainForm makes the keyboard button disappear for the duration
of the App.

Felipe Monteiro de Carvalho wrote 14 lines
LCL-wince does not activate the keyboard upon closing a modal form, Windows CE does this alone and I dont know if this can be prevented. Why dont you just call resetpda in OnActivate? (or both OnCreate and OnActivate) -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
View this message in context: http://www.nabble.com/Does-Anybody-Know-how-to-REALLY-kill-an-App-on-Pocket-Pc--tp25107234p25151462.html Sent from the Free Pascal - General mailing list .

Reply by email