什么是Windows 10 QuickAccess绝对路径 [英] What is Windows 10 QuickAccess Absolute Path

查看:403
本文介绍了什么是Windows 10 QuickAccess绝对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式访问Windows 10 QuickAccess, 通过按钮事件。

I need to programmatically access windows 10 QuickAccess,  via Button event.

这可以通过调用Process.Start来实现,它启动了explorer.exe文件, 并打开一个自定义文件夹,作为参数发送。 这没有特别的问题。

This can be achieved invoking a Process.Start , which start the explorer.exe file,  and opens a custom folder which is sent as an argument.  There is no particular issue whit this.

我没有找到的是我应该传递什么参数来打开QuickAccess文件夹或别名或符号链接。

What I haven't find is what argument should I pass to open the QuickAccess folder or alias or symlink.

直到Windows 8,它是C:\ User \ Links, 现在它已改为?

Till Windows 8 it was C:\User\Links,  now it has changed to ?

谢谢你,Jorge

推荐答案

Hello Jorge,

Hello Jorge,

您可以打开"QuickAccess"通过触发"windows + E"以下是使用win32 api的简单演示。

You could open "QuickAccess" by triggering "windows+E" and the following is a simple demo in using win32 api.

 static class KeyboardSend
    {
        [DllImport("user32.dll")]
        private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

        private const int KEYEVENTF_EXTENDEDKEY = 1;
        private const int KEYEVENTF_KEYUP = 2;

        public static void KeyDown(Keys vKey)
        {
            keybd_event((byte)vKey, 0, KEYEVENTF_EXTENDEDKEY, 0);
        }

        public static void KeyUp(Keys vKey)
        {
            keybd_event((byte)vKey, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
        }
    }


    class Program
    {
        static void Main(string[] args)
        {

            KeyboardSend.KeyDown(Keys.LWin);
            KeyboardSend.KeyDown(Keys.E);
            KeyboardSend.KeyUp(Keys.LWin);
            KeyboardSend.KeyUp(Keys.E);
         }
      }

此致,

Fei Hu

这篇关于什么是Windows 10 QuickAccess绝对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆