I'm having problems getting an application I wrote for Windows Mobile 6.0 to run more than one time on my smart phone.
我在使用我为Windows Mobile 6.0编写的应用程序在智能手机上运行多次时遇到问题。
I built it into a .cab and it installs and runs fine the first time, but if I close the application and try to start it again, it will not run unless I restart the phone.
我把它构建成.cab并且它第一次安装并运行良好,但如果我关闭应用程序并尝试再次启动它,除非我重新启动手机,否则它将无法运行。
I have checked the task manager after closing the application and it does not show up.
关闭应用程序后我检查了任务管理器,但没有显示。
2 个解决方案
#1
Are you sure that you are closing your application properly? I recommend using a process manager to see if your application still runs on the background.
您确定要正确关闭申请吗?我建议使用进程管理器来查看您的应用程序是否仍在后台运行。
#2
My problem was in not handling closing the main Form when the application exited from one of the other forms. Ex: application starts with calculator loaded, user loads unit conversion form from calculator form, and the app hides the calculator. User then closes the unit form and calculator is still running.
我的问题是当应用程序退出其他表单时,没有处理关闭主表单。例如:应用程序从加载计算器开始,用户从计算器表单加载单位转换表单,应用程序隐藏计算器。然后用户关闭单位表格,计算器仍在运行。
All that I missed was handling an OnClosed event in my main form for when the user tried closing the application from one of the other forms.
我错过的只是在我的主表单中处理OnClosed事件,当用户尝试从其他表单中关闭应用程序时。
#1
Are you sure that you are closing your application properly? I recommend using a process manager to see if your application still runs on the background.
您确定要正确关闭申请吗?我建议使用进程管理器来查看您的应用程序是否仍在后台运行。
#2
My problem was in not handling closing the main Form when the application exited from one of the other forms. Ex: application starts with calculator loaded, user loads unit conversion form from calculator form, and the app hides the calculator. User then closes the unit form and calculator is still running.
我的问题是当应用程序退出其他表单时,没有处理关闭主表单。例如:应用程序从加载计算器开始,用户从计算器表单加载单位转换表单,应用程序隐藏计算器。然后用户关闭单位表格,计算器仍在运行。
All that I missed was handling an OnClosed event in my main form for when the user tried closing the application from one of the other forms.
我错过的只是在我的主表单中处理OnClosed事件,当用户尝试从其他表单中关闭应用程序时。