在列表框中插入批量记录时禁用指针 [英] disabling of pointer while inserting bulk records in listbox

查看:69
本文介绍了在列表框中插入批量记录时禁用指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
谁能告诉我在列表框中插入批量记录时如何使光标停留在窗体上.当我用于插入超过10,000左右的批量记录时,表单的光标被禁用.请帮帮我.
谢谢,
Akky

Hi everyone,
Can anyone tell me that how can I enable the cursor to stay on form while inserting bulk records in listbox. The cursor of the forms is disabled when I use to insert bulk records like above 10,000 or so. Please help me.
Thanks,
Akky

推荐答案

如果您要使用某些for循环或while循环将其插入列表框的Item源,那么在循环时可能要使用

If you are using some for loop or while loop to insert to the Item source of the listbox than you may have to use while looping

Application.DoEvent()



这将使您的应用程序响应,即使后端代码上有一个循环,您也可以在窗体上看到光标.
这将适用于Windows应用程序表单.



This will make your application respond even there is a loop going on the backend code, and you will able to see the cursor on the form.
This will work for windows application forms.


这篇关于在列表框中插入批量记录时禁用指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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