Using Application.DoEvents() in real-time applications is dangerous!

It has been numerously written that Application.DoEvents() method is not desirable, especially for high-performance applications. There are many reasons for this starting from message processing procedure and ending with non-evident problems with application response  to user activity and code execution. In most cases programmers use this method without thinking of consequences or its working principle. [...]

.NetGrid v2.8.4 has been released. Improvements when CPU is heavily loaded.

This version contains bug fixes and performance improvements. The following features have been added: [NEW] Greatly improved the reliability and responsiveness of the grid when the CPU is heavily loaded. The following bugs have been fixed: [BUG] Fixed a bug in the column configurator which in some cases does not allow reordering of visible columns. [...]

.Net performance. Practical recommendations

Even the best performing component can be hindered by incorrect use. Below we provide practical recommendations on what should be used or avoided in application programming. Following the tips below you will be able to create applications with the same efficiency as this demo application. We also provide source codes for this example to show [...]

Why BindingList is slow with objects implementing INotifyPropertyChanged interface

A BindingList<T> is the main tool for binding objects to grids. It is a container that may notify subscribers when data is added or removed. For this purpose it provides public ListChanged event that specifies collection changes with ListChangedType. Besides changing the collection itself (adding, removing, etc) the binding list notifies of data object changes. [...]

Realtime cell highlighting

Financial markets are lately becoming increasingly volatile and this generates a huge volume of information that has to be displayed in trading applications. Any changes of price or the number of sales/purchase offers for various financial instruments have to be displayed at trader’s screen. Visually it looks as highlighting relevant grid fields for specified time. [...]

Correct organization of event processing in a separate thread

Multithreaded application became something common. The main reason for that is execution of resource-intensive tasks in parallel to GUI without stopping it for long operations. As it is well known, the easiest way for asynchronous data processing used by ThreadPool. This method is not only the easiest, but also very efficient. Notwithstanding its merits, it [...]

How to avoid exceptions upon exiting application

Almost every modern application is multi-threaded. Threads are needed to work with various devices and IP protocol stack and to perform demanding computing operations. Results of work performed in these threads should be displayed in graphical controls. Control.Invoke / Control.BeginInvoke are the main methods used for thread synchronization.  These methods work excellent only when control [...]

Performance of synchronization with GUI thread

It is well known that all graphical controls should work in one thread. There are many articles on this subject, so we shall not repeat them. In multi-threaded applications every call should be synchronized with the main thread containing windows message loop. Control is a base class that provides Control.Invoke and Control.BeginInvoke methods. The first [...]