How do i save bitmap files????:(
Printable View
How do i save bitmap files????:(
this works for me
Call SavePicture(Picture1.Picture, "c:\test.bmp")
I mean i want to save bitmap and text in one file.
Where is the text? What do you want to make a bitmap file out of? Some more specific details please.
The text and the picture is in the rich text box.
Then you need to save the whole file in RTF format. You can use simple file access to save each chunk of that RTF text as an RTF file like this:
VB Code:
Open mywholefile.txt For Output As #1 Print #1, RichTextBox1.TextRTF Close #1
Ah...the text and picture are in a RichTextBox...that makes it clear, although Abdul beat to a solution. However, Abdul, I have a question. If haravinth wishes to save the contents of his RichTextBox to a bitmap file, wouldn't he want to do something likeVB Code:
'create as bitmap file. Windows should recognize the extension Open mywholefile.bmp For Output As #1 Print #1, RichTextBox1.TextRTF Close #1
I thought he wanted to save the contents of the Rich Text Box (including the text and the bitmap) as he said here:Quote:
Originally posted by Hack
However, Abdul, I have a question. If haravinth wishes to save the contents of his RichTextBox to a bitmap file, wouldn't he want to do something like...
If you save the file as a bitmap, it is gonna save the text and the bitmap(s) which will corrupt the whole bitmap file. I thought he wanted to just save the contents of Rich Text Box (including that bitmap) so he will be able to retrieve that back again;)Quote:
haravinth The text and the picture is in the rich text box.
Yaa, Abdul is right. Now my program is working well.:)
Ok. My misunderstanding. I'll go take my foot out of my mouth now (today seems to be the day for that for me!)