Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Windows 10与xp、7和8中的按键事件行为_C#_Vb.net - Fatal编程技术网

C# Windows 10与xp、7和8中的按键事件行为

C# Windows 10与xp、7和8中的按键事件行为,c#,vb.net,C#,Vb.net,嘿,windows 10中的按键事件出现了一些问题 看起来,如果文本框中有一个按键按下事件,并且您继续按下键盘,则所有其他事件都会被阻止。 从最后一次按键到块reareses 500毫秒-1秒之间有一个小延迟 从上次按键到点击事件被阻止,有一个小的延迟, 此块持续约500-1000毫秒 在XP-8上,这似乎是不同的 有人对解决方案提出建议吗 我们尝试了什么。 -其他.net框架(3.5-4.6.2) -WPF应用程序相同的场景 问题视频: 一个简单的示例应用程序: using System;

嘿,windows 10中的按键事件出现了一些问题 看起来,如果文本框中有一个按键按下事件,并且您继续按下键盘,则所有其他事件都会被阻止。 从最后一次按键到块reareses 500毫秒-1秒之间有一个小延迟

从上次按键到点击事件被阻止,有一个小的延迟, 此块持续约500-1000毫秒

在XP-8上,这似乎是不同的

有人对解决方案提出建议吗

我们尝试了什么。 -其他.net框架(3.5-4.6.2) -WPF应用程序相同的场景

问题视频:

一个简单的示例应用程序:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KeyPressTestApp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Add("U Pressed Me u know the btn"); 
        }

        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {

            listBox1.Items.Add("U Pressed key " + e.KeyChar );

            //No effect
            //Application.DoEvents();
            //System.Threading.Thread.Sleep(1);    
        }
    }
}

没有责备。在Windows 10上的行为与在Windows 7上的行为相同(单击按钮后立即单击)。但在Windows 10上,鼠标出现了抖动,很难移动,这是因为在键入时隐藏光标的设置被激活。在我们的测试中,情况并非如此,如果您快速键入键盘,同时尝试单击按钮,我们会体验到单击未被注册…无需重新编程。在Windows 10上的行为与在Windows 7上的行为相同(单击按钮后立即单击)。但在Windows 10上,鼠标出现了抖动,很难移动,这是因为在键入时隐藏光标的设置被激活。在我们的测试中,如果你快速键入键盘,同时尝试单击按钮,我们会体验到单击不会被注册。。。