Windows Search Index Reader

Hi !

Few days ago one of my good friends, Ishan lost alot of his data when his 1TB external hdd fell from desk. Sad 😦

There are almost no chances of getting his data back. Today he found he had indexed his entire external hard disk on his computer….  fine, he can’t have his data back but there are some hopes to know what all he has lost !

I quickly derived a very simple app from Windows Search SDK code samples that lists all the entries in a DataGridView and gave him but it was pain to see whole file list in table. So made this thing.

It will also show indexed files in Explorer like view. Again, note that its just an index, not the true files. Its only to tell him what all was there so that he can try to get those things back from other sources 🙂

Continue reading

Flash Form window

Flash window to alert user or attract attention

        static extern Int32 FlashWindowEx(ref FLASHWINFO pwfi);

        public struct FLASHWINFO
            public UInt32 cbSize;
            public IntPtr hwnd;
            public Int32 dwFlags;
            public UInt32 uCount;
            public Int32 dwTimeout;
        // stop flashing
        Int32 FLASHW_STOP = 0;

        // flash the window title
        Int32 FLASHW_CAPTION = 1;

        // flash the taskbar button
        Int32 FLASHW_TRAY = 2;

        // 1 | 2
        Int32 FLASHW_ALL = 3;

        // flash continuously
        Int32 FLASHW_TIMER = 4;

        // flash until the window comes to the foreground
        Int32 FLASHW_TIMERNOFG = 12;

        public void Flash()
            FLASHWINFO fw = new FLASHWINFO();

            fw.cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO)));
            fw.hwnd = this.Handle;
            fw.dwFlags = FLASHW_ALL;
            fw.uCount = UInt32.MaxValue;

            FlashWindowEx(ref fw);