Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
Posted 26-Sep-12 4:51am
Edited 26-Sep-12 4:58am
Nueman8.5K
v2
Comments
Ashraff Ali Wahab at 26-Sep-12 9:59am
   
You have to use a background process to insert the data into the DB and progress bar to fix this issue.
 
Example here : http://msdn.microsoft.com/en-us/library/cc221403%28v=vs.95%29.aspx

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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()
 
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.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100