473,769 Members | 4,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.Ima ge
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e
As System.EventArg s) Handles Generate.Click
TextBox2.Text = TextBox1.Text

End Sub

Private Sub Save_Click(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles Save.Click

If savedialog.Show Dialog = Windows.Forms.D ialogResult.OK Then
myimage.Save(sa vedialog.FileNa me)
End If
End Sub
End Class

Thanks.

Oct 26 '07 #1
2 2171
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.ima ge = new bitmap(cstr(tex tbox1.text))
' textbox1 may be ... "someImage. jpg"
"kimiraikko nen" wrote:
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.Ima ge
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e
As System.EventArg s) Handles Generate.Click
TextBox2.Text = TextBox1.Text

End Sub

Private Sub Save_Click(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles Save.Click

If savedialog.Show Dialog = Windows.Forms.D ialogResult.OK Then
myimage.Save(sa vedialog.FileNa me)
End If
End Sub
End Class

Thanks.

Oct 30 '07 #2
On Oct 30, 5:09 am, chad <c...@discussio ns.microsoft.co mwrote:
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

Oct 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8732
by: jack | last post by:
Hi. I wanted to save image from the form in my accss database. there is one picture box on form which loads the picture from the harddisk . i want this picture to store in my database .. thanks for the help..
4
3733
by: Hrvoje Vrbanc | last post by:
I would like to know the most efficient way to copy an image from an Internet URL to the local hard disk by means of using an ASP.NET page. So, I would like to click the button on the ASP.NET page and thus to save a copy of a picure at let's say http://www.blabla.com/pic.jpg to predefined location on my hard disk. Thanks in advance, Hrvoje
1
1351
by: chandan | last post by:
Hi, I am in search of a control that can save image form my webpage. On that web page I am using my own context menu and I disabled the default context menu of IE. Now I want the same functionality as given by IE context menu item save Image as! So tell me how IE works in that case?? Which API or function calls IE when clicking on their context menu Item Save Image As..?
0
2555
by: hnpatel | last post by:
hello friends, i m making application in vb.NET. i m using MY SQL 5.0 and vs 2005 for this application. Now I want to save image file in sql database. i m using blob datatype of image field. i want to save image file from vb.net form. i m getting image in picturecontrol through openfiledialogbox. now how to save this image in my database through insert query? Plz help me for this..... Thanx in advance.....
6
4040
by: Jerry Spence1 | last post by:
I am using a network camera that saves the image in a byte array in memory (via their ocx component, and in the OnNewImage event I can get the pointer to the image and the byte length as e.lFrmBytes e.lPtrToImage How do I get at that array in memory and save it to disk? It seems to suggest a pointer which is not supported in VB.
1
2884
ranjana1980
by: ranjana1980 | last post by:
In my project of desktop application using c#.net save image in database during registration of student But it is not mandatory.Without Browse the image i click on insert button it gives error "Empty path name is not legal". con.ConnectionString = "Data Source=XPO3;Initial Catalog=Imsapplication;Integrated Security=True"; con.Open(); //Cryclass cc = new Cryclass(); string filepath = textBox2.Text; ...
2
9662
by: rajeshkumarswain | last post by:
hi friends, I am new in php and i am trying to save image to database. Please provide a sample.
3
2017
by: regan2007 | last post by:
How are you going to save image in database using php?Please explain it if you do kno
1
2794
by: sushant191 | last post by:
Hi Everyone , can any one tell me, how to save image url path in variable using fckeditor built-in image browser for ex.(~/userfiles/image1.jpg). I m not uploading image from outside fckeditor. Pls Help Me!!!!!! Thanks in advance.
2
7497
by: aznimah | last post by:
Hi, i need help on how to save the image that return from picturebox? basically the program works, 1)Read image (.png)--> load into pictureBox1 2)Fire button save to save the image from pictureBox1 Here i place code:
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.