当前位置: 代码迷 >> 综合 >> C# RichTextBox 插入图片
  详细解决方案

C# RichTextBox 插入图片

热度:20   发布时间:2024-01-09 22:49:18.0
private void button1_Click(object sender, EventArgs e)   {   OpenFileDialog openFileDialog1 = new OpenFileDialog();   openFileDialog1.Filter = "图片文件|*.jpg|所有文件|*.*";   if (openFileDialog1.ShowDialog() == DialogResult.OK)   {   Clipboard.SetDataObject(Image.FromFile(openFileDialog1.FileName), false);   richTextBox1.Paste();   }   }