如何在Windows Vista及以上版本中进入Windows Flip 3D模式?

13

是否可以通过编程方式在Windows Vista及以上系统上触发Flip 3D mode

enter image description here

这与您手动按下CTRL + WIN + TAB是相同的。


我只是为了分享而发布这个。我不知道它的实际应用(即使我喜欢这种模式 :))。 - TLama
1
请注意,此功能在Windows 8中已经消失。 - Deanna
@Deanna,作为整个Aero的一部分,我们需要确保从地面到树木的每个细节都得到了妥善处理。 - TLama
1个回答

18

Shell对象具有WindowSwitcher方法,可以调用此模式。

以下是Delphi代码示例:

uses
  ComObj;

procedure EnterWindowSwitcherMode;
var
  Shell: OleVariant;
begin
  try
    Shell := CreateOleObject('Shell.Application');
    Shell.WindowSwitcher;
  finally
    Shell := Unassigned;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  if Win32MajorVersion >= 6 then // are we at least on Windows Vista ?
  begin
    try
      EnterWindowSwitcherMode;
    except
      on E: Exception do
        ShowMessage(E.ClassName + ': ' + E.Message);
    end;
  end;
end;


更新:

或者如Norbert Willhelm在这里所提到的,也有一个IShellDispatch5对象接口,这实际上引入了WindowSwitcher方法。因此这是同样的另一种版本...

以下代码片段需要Shell32_TLB.pas单元,您可以使用Delphi创建它(请注意,您必须至少拥有Windows Vista,其中首次使用了IShellDispatch5接口):

  • 转到菜单Component / Import Component
  • 继续选择Import a Type Library
  • 选择Microsoft Shell Controls And Automation并完成向导

代码如下:

uses
  Shell32_TLB;

procedure EnterWindowSwitcherMode;
var
  // on Windows Vista and Windows 7 (at this time :)
  // is Shell declared as IShellDispatch5 object interface
  AShell: Shell;
begin
  try
    AShell := CoShell.Create;
    AShell.WindowSwitcher;
  finally
    AShell := nil;
  end;
end;

4
还有一个名为IShellDispatch5的接口。 - Norbert Willhelm

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接