如何知道我的应用程序在Background或Foreground中运行?

时间:2010-10-29 13:23:20

标签: c# windows-mobile background status

我使用C sharp制作Windows Mobile 6.5应用程序。

在应用程序中,我打开一个案例中的默认浏览器。当我打开浏览器时,应用程序仍然在后台运行。但我希望应用程序不运行,当用户返回应用程序时,应用程序再次运行。

因此,我应该知道应用程序在后台或前台运行的状态。 怎么知道???

如果有人知道,请回复我。提前谢谢。

1 个答案:

答案 0 :(得分:1)

看看这个

http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.status.systemproperty.aspx

属性ActiveApplication

将帮助您满足您的需求。

我还与Daniel Moth一起使用上面的内容发现了这个视频

http://www.microsoft.com/uk/msdn/screencasts/screencast/191/Windows-Mobile-Managed-APIs-Status.aspx

相关问题