How to save image with the textbox(read-only) on it?

K

kimiraikkonen

Hello,
I want to save a picture using that code and i have a read-only
textbox on the picturebox1 named "textbox2".

I want users to enter their custom text using "textbox1" and save the
image with the text associated to textbox2.text (will be saved/
displayed on picturebox1)

But when i save the picturebox1 is saved empty textbox.
How can i do that?


Public Class Form1
Dim myimage As Bitmap = picturebox1.Image
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Generate.Click
TextBox2.Text = TextBox1.Text

End Sub

Private Sub Save_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Save.Click

If savedialog.ShowDialog = Windows.Forms.DialogResult.OK Then
myimage.Save(savedialog.FileName)
End If
End Sub
End Class



Thanks.
 
G

Guest

I really have a hard time understanding what you are trying to describe. But
looking at your code, I believe you might be needing this for your
Button1_Click

picturebox1.image = new bitmap(cstr(textbox1.text))
' textbox1 may be ... "someImage.jpg"
 
K

kimiraikkonen

I really have a hard time understanding what you are trying to describe. But
looking at your code, I believe you might be needing this for your
Button1_Click

Hi,
I tried to decribe as much as clear but the project is a bit
extraordinary. Thanks but, the code you've given wasn't my need.

Think i have a custom jpg picture in a picture box(other methods are
welcome), and there's a textbox on it, the user enters sth using
"generate.click" button, then the text sits onto picture, the problem
is when i save the new picture (with the text on it), it only saves
base picture. But i want to save picture with the text TOGETHER which
was added by user (textbox2.text)

Thanks.

kimiraikkonen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top