Skip to content

Category Archives: Windows Forms

Import Data from Excel using C# – Part 2

16-Feb-10

In my web application, we used to import data from MS Excel file. Few days before one of the client representative posted an issue that he can’t import data from XLSX (MS Excel 2007 File Format) files. Previously we were using OLE DB provider to import data from Excel file (Checkout my previous post regarding [...]

System.InvalidOperationException – Cross-thread operation not valid

05-Feb-10

System.InvalidOperationException – Cross-thread operation not valid: Control ‘xxxxx’ accessed from a thread other than the thread it was created on. Normally we get this exception when we try to modify some control property from another thread. This is because when a program executes the operating system will assign a thread for the creation of UI [...]

Isolated Storage in C#

03-Feb-10

As I am working in a Windows Application, client asked about the Windows 7 and Windows Vista compatibility. As I was writing only managed code I was not worried about the compatibility and most of the time it was working fine. (I was using Windows Vista). Today evening one of my colleague was testing the [...]

WebCam in your applications using C#

16-Nov-09

In the current project I am working I got a chance to implement web cam image capture. There is two different ways to do this in C#.

Using WIA Sdk – It is library coming with Windows. And you can download this COM library from Microsoft site. But the problem of this approch is sometime the [...]

Post data using HttpWebRequest in C#

10-Nov-09

While working around twitter or any other REST API services, you may require to do a post request to web server. If you are using .net can do this either using WebClient class or using HttpWebRequest class. Both these classes exists in System.Net namespace. I am using HttpWebRequest here because HttpWebRequest gives you more fine [...]