                 IntPtr hdc = g.GetHdc();                 try                 {                     PrintWindow(windows[listBoxIndex], hdc, 0);                 }                 finally                 {                     