well..i am doin a button that will download a picture off the internet and in the end will show the downloaded picture in himself...but i am getting a g@y "out of memory"... grrr the code is the following:

this is where the error is:
PHP Code:
        private void downloadProgress(downloadManager e)
        {
            if (
this._currentProgress == 100)
            {
                
string fn "C:\\pic.jpg";
                
_parent.Image Image.FromFile(fn);
            }
            else
            {
                
this._currentProgress = (int)e.currentProgress;
            }
        } 
the code that draws the picture is this:
PHP Code:
        private void OnPaint(object senderSystem.Windows.Forms.PaintEventArgs e)
        {
            
Button button = ((Button)sender);

            if (
this.devImplementation.isProgressBarVisible == true)
            {
                if (!(
this.devImplementation.currentProgress >= && this.devImplementation.currentProgress <= 100))
                {
                    throw (new 
System.ArithmeticException("The value must be between 0 and 100"));
                }

                
double progress = ((double)this.devImplementation.currentProgress / (double)100) * (double)button.Width;
                    
                
e.Graphics.FillRectangle(
                    new 
System.Drawing.SolidBrush(this.devImplementation.mainColor),
                    new 
Rectangle(
                    new 
Point(0button.Height 10),
                    new 
Size((int)progress 20)
                    ));
            }
        }