Hi All,

I have got the multiline textbox in the picturebox.

I want to save the whole picture into a bmp file (including the multiline textbox).

Is there any easy way to do it?

what I have done at the moment is:

pic.currentx = textbox.left
pic.currenty = textbox.top
pic.print textbox.text

The multiline text in the textbox can be printed, but only the first line can be printed in (textbox.left, textbox.top)
the second line onward is being printed in the 0 x coordinates.
so, those lines are written in most left of the picture.

do you have any idea to solve it?
thanks

Hi thanks for the link, but I have a very big image. it's bigger than my screen. that's why, when I captured the screenshot, I can only capture part of it. do you have any clue to solve this?
thanks

Hi neosonic,
Have you ever tried to print form instead of bmp picture. I think Printing form should solve your problem.
Here is how you can print form.

Private Sub Command1_Click()
Me.PrintForm
End Sub

You are welcome to ask more if it doesn't meet your requirement.

Thanks

hi kinwang, thanks again.

printform only gives me an error msg, since I don't have printer installed.

I picture that I want to capture is much bigger than the form itself.

I put that big picturebox, inside the smaller picturebox and use scrollbox to see the big picture part by part.

do you have any clue?
what was your situation before?

Hi neosonic,
If you dont have your printer installed then why you want to print, how? Even if your form is bigger than Screen Size Print Form should work. If you dont have your printer installed it will save as mdi file. if you are not clear then you can upload your project so that i will also understand more about your project.

Thankx

thanks kinwang.
sorry for unclear information, I just want to save the picture as a .bmp file.
and I just want to save the picture, not the form.

thanks for your help, I really appreciate it

kinwang2009, it is you that is mistaken as neosonic stated in post #1...

>I want to save the whole picture into a bmp file (including the multiline textbox).

(I think you are confusing the print screen function, which takes a picture of the desktop or a particular window and allows you to save that image to file, with printing to a printer...)


Unfortunatlly neosonic, your options are limited but what you can do is use the printscreen method shown to you to capture the image of just the textbox. Then use that image to alter the original image by using bitblt api or the slower paintpicture method. Then, once that is done, you would use the savepicture method which will save the graphic as a bitmap...

Note: There are methods of saving the contents of a picture box as a jpeg but this will involve a lot more code and definitly delving into the API and if you use your friends (yahoo, google, ask, answers, bing) and search for vb6 save jpeg, you should get some sample code...

Good Luck

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.