How to implement text to speech in WP7 using BING API

In WP8, Microsoft introduced libraries for both Text to Speech and Speech to Text without an active internet connection. But this feature is not available in WP7. I found some article implementing Text to Speech using BING API, but seems it is no more working. Here is one implementation using...


"The file you are trying to open, [filename], is in a different format than specified by the file extension" error opening Excel file

Today I got another problem with Excel file opening. One of the my colleague wrote code to generate XLS / XLSX file using OleDb object. And it was working perfectly. Only problem, while opening the XLS / XLSX file, MS Excel was displaying an error like this. And clicking Yes...


Registry.LocalMachine.OpenSubKey() returns null

To verify excel installed on my local system; initially I tried using OpenSubKey() method. But it was always returning null, even though I can see the registry key using regedit.exe. I was using a Windows 8, x64 bit OS and the application was developed in VS 2008, Winforms, x86 platform....


How to detect MS Excel installed on the system

Today I faced an issue, I want to open an excel file from a Windows application; before opening the file, I want to verify that MS Excel installed on the system. I found a solution using registry from MSDN. Here is the code snippet. //14.0 is the version of the...


How to generate and read QR code in asp.net

QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan; a barcode is an optically machine-readable label that is attached to an item and that records information related to that item: The information...


IIS Express Webserver Here - Shell Extension

If you have installed mono, mono comes with a web server called XSP. One of my favorite feature of XSP (or mono) is you can right click on any folder and start a website with that folder as the physical path. And if you are downloading lot of sample code...


How to fix error The target "GatherAllFilesToPublish" does not exist in the project

Today while publishing a web application I got a strange error like this from Visual Web Developer express. The target “GatherAllFilesToPublish” does not exist in the project. Web publishing was working without any problems, only reason was I have installed Windows Azure SDK. Then found the solution, thanks to Google....


How to pause / resume a thread in C#

Here is the code snippet which will help you to pause / resume a thread using ManualResetEvent class. Both Suspend() and Resume() methods are deprecated in .Net Framework. So both of these methods not recommended to use. private ManualResetEvent _manualResetEvent = new ManualResetEvent(true); var thread = new Thread(() => {...


Unexpected error encountered opening Visual Studio project

Today while opening a win-form project, I got an exception message like this from Visual Studio. And then the Visual Studio project was not available in the solution. All the project said was “The project file cannot be loaded.” This error is because the project was under Subversion version control,...


Unit Testing Windows Phone Applications

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App. This will help you to create unit test project for Windows Phone 8 applications. Once you create the project, necessary...