Monthly Archives: July 2009

Stages of life

We have 3 stupid stages of life… Teen age: Have Time + Energy, but No Money   Working Age: Have Money + Energy, but No Time   Old age: Have Time + Money, but no Energy   Which stage are you … Continue reading

Posted in Entertainment | Leave a comment

How to run target control command programatically

http://blogs.msdn.com/ce_base/archive/2007/04/03/run-taget-control-command-programatically.aspx

Posted in Information Technology | Leave a comment

How to convert LPCTSTR to System::String

LPCTSTR myvar;string Text = System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)(void*)myvar);

Posted in Information Technology | Leave a comment

Converting CString to LPCTSTR

CString has an inbuilt operator which returns a constant pointer to it’s internal data member. It’s called operator LPCTSTR(). So if you write code like this… CString Str;   LPCTSTR lpctszStr = Str;    The compiler replaces above line with a … Continue reading

Posted in Information Technology | Leave a comment

Simple Excel Automation Using C#

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using System.Runtime.InteropServices; using Xcel = Microsoft.Office.Interop.Excel;     namespace Excel {     class Program     {         static void Main(string[] args)         {             Xcel.Application excelApp = new Xcel.Application();             … Continue reading

Posted in Information Technology | Leave a comment