对于在 IE7 中显示的基于 Web 的程序,如何禁用 Windows 右上角的“X”关闭按钮?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/77993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can you disable the Windows' "X" close button in the upper right-hand corner for a web-based program that is displayed in IE7?
提问by
We are using a software program at our school to enter IEPs (Individualized Education Programs). When entering goals and objectives for a student, users are provided with a Save and a Close button. Close is meant for users not wishing to save the goal they just chose. However, our users are sometimes wanting to back out of the screen and close the Window by clicking on the X in the upper right hand corner. Unfortunately, this somehow corrupts data and the user has difficulty later entering goals. The software company tells us to educate our staff not to click on the X and that there is no way to disable it. The software is web-based and our school has standardized on IE7.
我们正在学校使用软件程序进入 IEP(个性化教育计划)。为学生输入目标和目的时,会为用户提供“保存”和“关闭”按钮。关闭适用于不希望保存他们刚刚选择的目标的用户。但是,我们的用户有时希望通过单击右上角的 X 退出屏幕并关闭窗口。不幸的是,这会以某种方式破坏数据,并且用户以后难以输入目标。软件公司告诉我们要教育我们的员工不要点击 X 并且没有办法禁用它。该软件是基于网络的,我们学校已经在IE7上进行了标准化。
回答by Mark Brackett
If it's web based, then you're probably just running a webpage in Internet Explorer. If that's the case, I'd recommend IE's kiosk mode.
如果它是基于 Web 的,那么您可能只是在 Internet Explorer 中运行网页。如果是这种情况,我会推荐IE 的 kiosk 模式。
If you need something a bit more heavyweight, Public Web Browseris a good and cheap choice that I've had good experiences with.
如果您需要更重量级的东西,Public Web Browser是一个不错且便宜的选择,我有过很好的使用经验。
回答by jamuraa
There is no way to disable the close button on the window (can you imagine!? ad popups that never go away! eek!).
没有办法禁用窗口上的关闭按钮(你能想象!?永远不会消失的广告弹出窗口!哎呀!)。
However, you can catch it and do something useful (like click the "close" button on the form). See: http://blogs.x2line.com/al/archive/2004/09/15/561.aspx
但是,您可以捕捉它并做一些有用的事情(例如单击表单上的“关闭”按钮)。参见:http: //blogs.x2line.com/al/archive/2004/09/15/561.aspx
回答by Christian P.
A lot of browsers have a full-screen mode (F11 in Firefox), where they take up the entire screen real estate, hiding any other UI elements, including the top bar (at least for Windows, dunno about *nix). This is a very simple solution, but afaik there's no way to disable the [x] for windows in general, you'd have to find a browser that does not use the default Windows look and doesn't implement it's own [x] in the corner.
许多浏览器都有全屏模式(Firefox 中的 F11),它们占据整个屏幕空间,隐藏任何其他 UI 元素,包括顶部栏(至少对于 Windows,不知道 *nix)。这是一个非常简单的解决方案,但是 afaik 通常无法为 Windows 禁用 [x],您必须找到一个不使用默认 Windows 外观并且不实现它自己的 [x] 的浏览器角落。