Tuesday, 21 May 2013

How to: Hide Column Headers in the Windows Forms DataGridView Control ?

Sometimes you will want to display a DataGridView without column headers. In the DataGridView control, the ColumnHeadersVisible property value determines whether the column headers are displayed. To hide the column headers Set the System.Windows.Forms.DataGridView.ColumnHeadersVisible property to false. dataGridView1.ColumnHeadersVisible...

Wednesday, 15 May 2013

WaitHandles - Auto/ManualResetEvent and Mutex

WaitHandles - Auto/ManualResetEvent and Mutex Monitor.Wait/Pulse isn't the only way of waiting for something to happen in one thread and telling that thread that it's happened in another. Win32 programmers have been using various other mechanisms for a long time, and these are exposed by the AutoResetEvent, ManualResetEvent and Mutex classes, all of which derive...

How to make a loop to wait until background thread completes its execution(Multi Threading)?

some times we want to use the same thread  again and again inside the loop, but problem occurs when the thread is executing at background by that loop completes its execution, we get unexpected exceptions. i too faced this probs, after struggling a lot i got the solution how to effectively use threads inside loop. so thought of posting to help others. as in my previous blog i wrote how to...

How to create a Background running thread ?

This example shows how to create a new thread in .NET Framework. First, create a newThreadStart delegate. The delegate points to a method that will be executed by the new thread. Pass this delegate as a parameter when creating a new Thread instance. Finally, call the Thread.Start method to run your method (in this case WorkThreadFunction) on background. [C#]using...

Friday, 10 May 2013