开发者

how to insert image in a textbox

开发者 https://www.devze.com 2023-03-08 21:41 出处:网络
Is there a way to insert an image in a textbox? I\'m working on a chat application. And I want to change the开发者_开发知识库 values \":)\", \":(\" etc. with icon images. But I couldn\'t find that how

Is there a way to insert an image in a textbox? I'm working on a chat application. And I want to change the开发者_开发知识库 values ":)", ":(" etc. with icon images. But I couldn't find that how can I insert image in a textbox?

Thanks.


If you are using RichTextBox for chat than look at Paste method

  Bitmap bitmap = new Bitmap();
  Clipboard.SetDataObject(bitmap );

  DataFormats.Format format= DataFormats.GetFormat (DataFormats.Bitmap);
  richTextBox.Paste(format);


Use RichTextBox
Insert Plain Text and Images into RichTextBox at Runtime
Inserting images into a RichTextBox control (the OLE way)

how to insert image in a textbox

0

精彩评论

暂无评论...
验证码 换一张
取 消