标签: task-switching

DirectX应用程序中Alt-Tab支持的最佳实践?

在编写DirectX应用程序时,显然需要支持用户暂停应用程序Alt- Tab以一种快速且无错误的方式.确保这一点的最佳做法是什么?需要解决的问题包括:

  1. 检测应用程序何时被退出选项以及何时返回的最佳方法.
  2. 用户alt-tabs时会丢失哪些DirectX资源,以及应对此问题的最佳方法.
  3. 应用程序体系结构中要执行的主要操作和要避免的事项,以支持alt-tab.
  4. 主要DirectX版本之间的任何显着差异,因为它们适用于上述.

有趣的技巧和陷阱也很好听.

windows directx alt-tab task-switching

38
推荐指数
1
解决办法
1万
查看次数

使用Delphi可以在W7中禁用任务切换键盘快捷键吗?

我的应用程序已经有一种模式多年,客户可以"禁用对操作系统的访问".显然这个功能与谷物相悖(至少就Windows而言),但有些安装我的应用程序是唯一一个应该可见的机器操作员程序,在这种情况下这样的功能是有用的.

我使用的技术是从几个"层"构建的:

  1. 隐藏任务栏和按钮.
  2. 禁用任务切换.
  3. 禁用我的主表单系统图标.

要禁用我使用的任务栏:

// Get a handle to the taskbar and its button..
Taskbar := FindWindow('Shell_TrayWnd', Nil);
StartButton := FindWindow('Button', Nil);

// Hide the taskbar and button
if Taskbar <> 0 then
  ShowWindow( Taskbar, SW_HIDE );
if StartButton <> 0 then
  ShowWindow( StartButton, SW_HIDE );

// Set the work area to the whole screen
R := Rect( 0,0,Screen.Width,Screen.Height );
SystemParametersInfo(
  SPI_SETWORKAREA,
  0,
  @R,
  0 );
Run Code Online (Sandbox Code Playgroud)

这很好用,但在W7上似乎还算不错.研究如何在几年前禁用任务切换发现了唯一一种"假装"你的应用程序是屏幕保护程序的技术(除了将应用程序重命名为'explorer.exe'并启动它等等)之外的其他方法:

procedure EnableTaskSwitching( AState : boolean );
// Enables / disables task …
Run Code Online (Sandbox Code Playgroud)

windows delphi taskbar task-switching

9
推荐指数
2
解决办法
3927
查看次数

禁用屏幕左边缘的3D Touch任务切换器手势

如果您使用带3D触控的iPhone稳固地按下屏幕的左边缘,您将调出任务切换器.

我想知道如何在我的应用中禁用此行为.

uigesturerecognizer ios task-switching ios9 3dtouch

6
推荐指数
1
解决办法
2339
查看次数

防止敏感信息出现在任务切换器中-Apple代码不起作用-iOS 8故障?

本文档:防止敏感信息出现在任务切换器中,它描述了一种在applicationDidEnterBackground中显示视图控制器的方法,以便在任务切换器中隐藏关键信息:

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Your application can present a full screen modal view controller to
    // cover its contents when it moves into the background. If your
    // application requires a password unlock when it retuns to the
    // foreground, present your lock screen or authentication view controller here.

    UIViewController *blankViewController = [UIViewController new];
    blankViewController.view.backgroundColor = [UIColor blackColor];

    // Pass NO for the animated parameter. Any animation will not complete
    // before the snapshot is taken. …
Run Code Online (Sandbox Code Playgroud)

background task-switching sensitive-data ios8

5
推荐指数
1
解决办法
403
查看次数