Developer, Former MVP, now at Microsoft - Best of 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
// Assuming a Form1 with 3 ProgressBar controlsprivate void Form1_Load(object sender, EventArgs e){ SendMessage(progressBar2.Handle, 0x400 + 16, //WM_USER + PBM_SETSTATE 0x0003, //PBST_PAUSED 0); SendMessage(progressBar3.Handle, 0x400 + 16, //WM_USER + PBM_SETSTATE 0x0002, //PBST_ERROR 0);}[DllImport("user32.dll", CharSet = CharSet.Unicode)]static extern uint SendMessage(IntPtr hWnd, uint Msg, uint wParam, uint lParam);