NullReferenceException in copy/ paste of image
<p>I am getting an error by implementing this simple  code. I donot understand where I am doing mistake.</p>

<p>// ERROR</p>

<blockquote>
  <p>An unhandled exception of type 'System.NullReferenceException' occurred in ImageCSharp.exe<br>
  Additional information: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.</p>
</blockquote>

<p>I can get clipboard text but why i can't get /set image.</p>

<p>//CODE</p>

<pre><code>    public void copy()
    {
        // Determine the active child form.
        fImage activeChild = this.ActiveMdiChild as fImage;
        if (activeChild != null)
        {
            PictureBox mypicbox = activeChild.picbox;
            string win_name = activeChild.Tag.ToString();
            Clipboard.SetImage(mypicbox.Image);
            Clipboard.SetText(win_name);

        }
    }

    private void paste()
    {

       Image im=  Clipboard.GetImage();
       this.pictureBox1.Image = im;
       MessageBox.Show(im.Size.ToString());

    }
</code></pre>

<p>regards,</p>
