WPF Kiosk模式 - 任务栏的烦恼 [英] WPF in kiosk mode - taskbar troubles

查看:268
本文介绍了WPF Kiosk模式 - 任务栏的烦恼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个需要在运行时锁定访问PC的应用程序。我需要使应用程序运行的最顶层,在全屏模式下,并确保ALT-Tab键不允许访问其他应用程序或任务栏。

I'm trying to build an application that needs to lock down access to the PC while it is running. I need to make the app run topmost, in full screen mode, and ensure that alt-tabbing doesn't allow access to other apps or the taskbar.

到目前为止,我设置最顶层=真,WindowStyle = WindowStyle.None和的WindowState = WindowState.Maximized其中大部分实现的我需要什么,但是我还是在这里的实例在任务栏变得可见。我试图实现窗口上引发LostFocus行为,但似乎并没有给我我需要的行为。

So far I have set TopMost = true, WindowStyle = WindowStyle.None and WindowState = WindowState.Maximized which achieves most of what I need, but I still get instances where the taskbar becomes visible. I've tried to implement the LostFocus behaviour on the window, but that doesn't seem to give me the behaviour I need.

任何人都可以点我的方向我要实现此行为,请?

Can anyone point me in the direction I need to implement this behaviour, please?

其他信息结果
不幸的是,这个项目的性质是这样的,我们不能改变客户端机器,它们运行的​​是XP,Vista和Win7的混合。 PC均不是由我们所拥有,但也可以用于递送在作为安全的方式作为可能的内容。 PC的业主都知道运行该软件的限制,并乐意为他们被我们的应用程序的执行过程中锁定,但也不能以其他方式被改变。

Additional Info
Unfortunately, the nature of this project is such that we can't alter the client machines, and they are running a mix of XP, Vista and Win7. The PCs are not owned by us, but are to be used for delivery of content in as secure a manner as possible. The owners of the PCs are aware of the restrictions for running the software, and are happy for them to be "locked down" during execution of our application, but they cannot otherwise be altered.

其他方式结果
HakonB 的提到斯科特Hanselman的BabySmash应用程序,所以我去寻找他的办理情况的方式。作为HakonB说,这不是处理失去焦点的清洁方法,但它似乎工作,或者至少应该做的,直到我找到一个更好的解决方案。他用一个触发间隔为秒定时器,打完一个电话user32.dll中的SetForegroundWindow(IntPtr的的hWnd)方法来抓住重点,无论它是否已焦点。感谢您的单挑,HakonB!

Other ways
HakonB mentioned Scott Hanselman's BabySmash application, so I went looking for his way of handling the situation. As HakonB says, it isn't the cleanest method of handling lost focus, but it seems to work, or at least should do until I find a better solution. He uses a timer that fires every second, and fires off a call to user32.dll's SetForegroundWindow(IntPtr hWnd) method to grab focus, regardless of whether it has focus or not. Thanks for the heads-up, HakonB!

推荐答案

看看斯科特Hanselman的BabySmash。您可以在 BabySmash

Take a look at Scott Hanselman's BabySmash. You can find the site at BabySmash

他有一对夫妇,描述他的工作,使应用程序的博客文章。它具有kiosk模式婴儿安全应用。

He had a couple of blog entries describing his work to make the application. It features a baby-safe application in kiosk mode.

您可以找到的 Codeplex上

这篇关于WPF Kiosk模式 - 任务栏的烦恼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆