"Minimising" an App to background

mjcoon

Well-Known Member
Licensed User
There is a general convention in PPC/WM that the top-right "X" button does not quit an application but merely "minimises" it, swopping it in the list of running programs with an earlier one. But some programs ignore this and just quit anyway. As do Windows' "Settings" programs.

But how to take control of this in Basic4PPC programs? I get mixed messages when reading about the Form1.Close method and the Close event. The simple power-monitor program that I am trying to write is meant to lurk in the background unless it detects battery discharge and then to get the attention of the user who would be doing something else with the PDA.

Mike.
 

mjcoon

Well-Known Member
Licensed User
Basic4ppc forms use the default 'ok' button instead of the 'x' button.
You can change it with FormLib.MinimizeBox.
Hardware.ShowTodayScreen can also be useful is you want to minimize your application.

Thank you Erel, I had found those two features but had not realised that they might do what I want.

My program now does its monitoring and makes its alert sounds while still minimised and then comes to the foreground to display its explanatory MsgBox. I had not realised that would be how it would work but it is very satisfactory.

Best regards, Mike.
 
Top