How to enter Windows Flip 3D mode on Windows Vista and above?
The Shell
object has the WindowSwitcher
method which can invoke this mode.
Here is the Delphi code example:
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;
Update:
Or as Norbert Willhelm mentioned here, there is also IShellDispatch5
object interface which in fact introduces the WindowSwitcher
method. So here's another version of the same...
The following piece of code requires the Shell32_TLB.pas unit, which you can in Delphi create this way (note, that you must have at least Windows Vista where the IShellDispatch5
interface was used the first time):
- go to menu Component / Import Component
- continue with selected Import a Type Library
- select Microsoft Shell Controls And Automation and finish the wizard
And the code:
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;