events - Hooking in to the Application.DoEvents method in VB.NET -


I am not very familiar with VB.NET so I do not know that this is possible ...

Some code that I'm working on is establishing a very large class property. Each asset is set to indicate an event in the setter that class data has changed. An event handler then serializes the example of a class into a database.

Obviously I do not want to be delayed before saving me if this happens after each property is set, or something else

I already have a cash implementation Keep a large list of examples, so an option will only process the cache and will save all saved examples from the database in the cache.

So I tried to see if I could get a class from the application (and override Dover), but it is unique, so there is no luck.

Any thoughts?

It is not completely clear that you talk about window message pumps or .NET events Are there. Either way, there are some common approaches:

  • Change the publisher so that it will raise only one event when everything is done; For example, with the Data Code, Binding List you can set RaiseListChangedEvents during a large update, then you can call the reset method after the validation
  • for a period Describe the goal of disabling things like drawing; For example, BeginEdit () / andEdit () pair of methods
  • If not possible: handle events, but do not do anything at hand; Only once you believe that nothing else comes; For example, before you do your fun stuff, adding a short delay

Here's an example of the last:


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -