PaintEventArgs.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
    public void Dispose()
    {
        Dispose (true);
        GC.SuppressFinalize (this);
    }

Same methods

PaintEventArgs::Dispose ( bool disposing ) : void

Usage Example

Beispiel #1
0
        private void UserSetPassword_Paint(object sender, PaintEventArgs e)
        {
            if (!textBoxPassword.Text.Equals(textBoxVerifyPassword.Text))
            {
                if (iconHit)
                {
                    toolTip1.SetToolTip(this, "Passwords do not match!");
                }

                toggle = !toggle;
                if (toggle)
                {
                    e.Graphics.DrawIcon(warn, iconPoint.X, iconPoint.Y);
                }
                else
                {
                    e.Graphics.DrawIcon(blank, iconPoint.X, iconPoint.Y);
                }
                e.Dispose();
                timer1.Start();
            }
            else
            {
                toolTip1.SetToolTip(textBoxVerifyPassword, "");
                e.Graphics.DrawIcon(blank, iconPoint.X, iconPoint.Y);
                e.Dispose();
                timer1.Stop();
            }
        }
All Usage Examples Of PaintEventArgs::Dispose