private void Form1_Paint( object sender, PaintEventArgs e ) { try { lock ( this ) { if ( bitmap != null ) { e.Graphics.DrawImage( bitmap, 0, 0 ); } } } catch ( Exception ex ) { MessageBox.Show( ex.Message ); } }