因为项目需要,需要把图片可以粘贴到form上面,比如word那样子性质的插入图片。请问有什么好办法。

解决方案 »

  1.   

    资源文件设置form背景
    richetextbox粘贴图片private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
            {
                if (e.Control && e.KeyCode == Keys.V)
                {
                    e.SuppressKeyPress = true;
                    richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 
                }
            }
      

  2.   

    2楼+1.
    DataFormats.Text中的文本该为图片就好
      

  3.   

     richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Dib));
      

  4.   

    文本框里还可以粘贴图片啊,我一般是将图片读取到pictureBoxprivate void loadButton_Click(object sender, EventArgs e)
    {
        openFileDialog1.Filter = "bmp | *.bmp";
        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
           bmp = new Bitmap(openFileDialog1.FileName);
           pictureBox1.Image = bmp;
        }
    }
      

  5.   

    我就是不想用picturebox 所以才来问大家的