Hi,
A graph is getting plotted in a Picture Box with real-time field values. I want to print the graph in real-time, say in every 10 secs. Tried the following :

Printer.PaintPicture Picture2.Image, 0, 0
Printer.EndDoc
but this didn't worked.....

help plzzz....

The code should be...

Printer.PaintPicture Picture2.Picture, 0, 0

and not Picture.Image

doing it.. got an Error 481, Invalid Picture....

searching around.. came across a point that Printer.Paintpicture prints only Images. If its true.. is there a way out to copy the picture of picture box to a image box..?? hopefully then the command should work....

the picture can only be a jpg/jpeg file and not bmp. Command will not work if you use the .image command. i've tested the code and it prints perfect on my side.

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.