不会立即触发按钮点击事件 [英] doesnt fire button click event immediately

查看:101
本文介绍了不会立即触发按钮点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们...
我是C#3.0中的新手.我正在开发基于Windows的应用程序.我的问题是在计时器内大约执行10000行代码...现在我触发按钮单击事件,当我单击按钮时它不会立即触发.我想立即触发单击事件..我怎么能做到这一点. .





请帮助我...

Hi frnds...
i am new in c# 3.0. i am developing windows based application. my problem is inside timer around 10000 lines of code execute... now i am firing button click event it doesn''t fire immediately when i clicked on button.i want to fire click event immediately .. how can i achieve this...





pls help me...

推荐答案

^ ]

http://msdn.microsoft.com/en-us/library/aa645740 (v = vs.71).aspx [多线程教程 [
Timer Threading in C#[^]

http://msdn.microsoft.com/en-us/library/aa645740(v=vs.71).aspx[^]
Multithreading Tutorial[^]


基于事件的系统将始终对事件进行排队并按顺序处理它们.我怀疑您的立即"定义对于不是时间紧迫的操作系统而言过于狭窄,并且在您提出要求时也绝不会做任何事情.甚至您的计时器也无法保证在您询问时完全触发,只是计时器的滴答声在那时才加入了消息队列.
An events based system will always queue events and deal with them in order. I suspect your definition of ''immediately'' is too narrow for an operating system that is not time critical, and never does anything exactly when you ask. Even your timer is not guarenteed to fire EXACTLY when you ask, only that the timer tick joins the message queue at that time.


这篇关于不会立即触发按钮点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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