i am trying to draw a iamge in an mspaint control, and then put that image into a richtextbox but it will ask for save file and file has been saved i want to show image in richtextbox as soon as click on save file in dialog window.


can anybody help me....

Recommended Answers

All 2 Replies

Use this Code

using the system clipboard

Dim A As Bitmap
A = (Bitmap.FromFile("C:\Image1.bmp"))
'if not from file, u can give ur custom Code for drawing bitmap here instead
Clipboard.SetData(Windows.Forms.DataFormats.Bitmap, A)
RichTextBox1.Paste()
Clipboard.Clear()

done
tell me if it works for u
-SpOOKy

hi i am used this code

Dim A As Bitmap
A = (Bitmap.FromFile("C:\Image1.bmp"))
'if not from file, u can give ur custom Code for drawing bitmap here instead
Clipboard.SetData(Windows.Forms.DataFormats.Bitmap, A)
RichTextBox1.Paste()
Clipboard.Clear()


but it can't work i am open an paint on button. when i close the paint after it will paste in richtextbox

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.