如何创建一个类似 kiosk 的 UI,让用户永远无法退出或切换到另一个应用程序? [英] How to create a kiosk-like UI, so that the user can never exit from it or switch to another application?

查看:22
本文介绍了如何创建一个类似 kiosk 的 UI,让用户永远无法退出或切换到另一个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个简单的 Delphi 应用程序,信息亭风格.

I need to create a simple Delphi application, kiosk style.

这是一个非常简单的事情,一个单一的表单,用户可以在其中写入一些个人信息来注册一个事件.4 TEdit 和一个 TButton.

It is a very simple thing, a single form where the user writes some personal info to register to an event. 4 TEdit and a TButton.

我想要实现的是避免用户执行与输入 TEdit 或单击 TButton 不同的任何操作.例如,我不希望他执行 ALT TAB(切换应用程序)、按键盘上的 Windows 键、执行 ctrl-alt-canc 等...

What I want to achieve is to avoid the user does any action different then typing in TEdit or clicking on the TButton. For example I don't want he does ALT TAB (switchin applications), pressing windows key on keyboard, doing ctrl-alt-canc, etc...

我可以添加一个受密码保护的按钮来启用/禁用此信息亭模式",这样当我需要退出信息亭模式时,我只需按下该按钮并退出.

I can add a passowrd protected Button that enables/disables this "Kiosk mode", in this way as I need to exit the kiosk mode I simply press that button and exit.

如何在不手动拦截所有按键的情况下,在 Delphi 中实现这种信息亭模式"?或者有人已经开发了这个以便共享吗?

How to achieve this "kiosk mode" in Delphi without intercepting all the keystrokes manually? Or did anyone already develop this so it can be shared?

推荐答案

我认为你最好创建一个新的 桌面,然后在那里运行您的应用程序.当您的应用程序完成后,您可以带回用户的桌面.这就是 Windows 登录屏幕的工作原理.当然,Windows 登录屏幕使用特殊的安全桌面.您在单独桌面中的应用程序将被隔离.您将拥有一个没有开始菜单、任务栏或桌面图标的桌面背景,因为 explorer.exe 不会在那里自动运行.当然a可以启动一个新进程,使用任务管理器,但是Windows中的桌面是安全对象;因此,您可以根据需要进行限制.当然,前提是您的应用具有足够的权限.

I think you'd better create a new desktop, and run your app in there. When your app is done, you can bring back user's desktop. That is how Windows login screen works. Of course Windows login screen uses a special secure desktop. Your app in a separate desktop would be isolated. You will have a desktop background with no start menu, taskbar, or desktop icons because explorer.exe is not running there automatically. Of course a can start a new process, using Task Manager, but desktops in Windows are securable objects; therefore, you can make restrictions if you want. Of course if your app has sufficient permissions.

要创建新桌面,您可以使用 CreateDesktop Windows API,切换到新创建的桌面,可以使用OpenDesktop功能.

To create a new desktop, you can use CreateDesktop Windows API, and to switch to the newly created desktop, you can use OpenDesktop function.

这篇关于如何创建一个类似 kiosk 的 UI,让用户永远无法退出或切换到另一个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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