System.ComponentModel.Win32Exception: The Operation Complected successfully
===

Am creating windows form with multiple panels to display graphics using C#.

    try
            {
                if (myBuffer != null)
                    myBuffer.Dispose();
                myBuffer = currentContext.Allocate(this.panel1.CreateGraphics(), this.panel1.DisplayRectangle);
            }
            catch (Win32Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

This is the code am using..

Am getting this error **System.ComponentModel.Win32Exception: The Operation Complected successfully** while maximizing the window from the minimized state.