3

Is there a way to activate task view programmatically in windows 10?

There was a way to activate Flip3D programmatically in win7 using the following copied from VBScript SendKeys CTRL+LWIN+TAB?

CreateObject("WScript.Shell").Run "rundll32 DwmApi #105"

I just want to make a .vbs or .bat file that activates windows 10 Task View.

Community
  • 1
  • 1
blakedesign
  • 31
  • 1
  • 2

2 Answers2

1

OK Found a way to do it with C#

  1. Install Visual studio
  2. Install NuGet http://docs.nuget.org/consume/installing-nuget
  3. File > New Project
  4. Name it taskview
  5. Visual C# > Console application
  6. File > Save All
  7. Tools > NuGet Package Manager > Package Manager Console
  8. Type "Install-Package InputSimulator" in Package Manager console window
  9. Paste Following text in taskview.cs window

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using WindowsInput.Native;// Importante
    
    namespace taskview
    {
        class Program
        {
            static void Main(string[] args)
            {
                WindowsInput.InputSimulator kb = new WindowsInput.InputSimulator();
                kb.Keyboard.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.TAB);
                Console.Read();// Keep console window open
            }
        }
    }
    
  10. Change Dropdown with Debug in it to Release

  11. Build > Build Solution
  12. Build > Build taskview

It should be in: My Documents\Visual Studio 2015\Projects\taskview\taskview\bin\Release\taskview.exe

paep3nguin
  • 424
  • 1
  • 5
  • 15
blake.esq
  • 53
  • 5
  • I just did this without the need of installing full visual studio (but I had .net framework installed). What I did was to run `dotnet new console -n taskview`. Then it creates a .net project with name taskview. After that, I paste your code into Program.cs and then I install InputSimulator in the project by running `dotnet add package InputSimulator --version 1.0.4`. Then just `dotnet build -c release` and you will find the taskview.exe in the bin/release folder. Thanks for your help! – JFValdes Nov 13 '21 at 09:43
0

You can use the function having the ordinal 105 within dwmapi.dll. You can use rundll32.exe to execute that function. This is how the command line looks like: start rundll32.exe dwmapi.dll #105

It will trigger the Flip 3D functionality on Windows Vista and later, if Aero is enabled.

Norbert Willhelm
  • 2,579
  • 1
  • 23
  • 33