soft4u
asked on
Printing lines
I use a picture box where I use the line statement.
Example: Picture.line (x, 2500)-(x,0)
The software draws a graph in this picture box. When trying to print this graph using: Myform.PrintForm everything prints but the graph.
(I use VB 6)
How can I get the graph printed??
Example: Picture.line (x, 2500)-(x,0)
The software draws a graph in this picture box. When trying to print this graph using: Myform.PrintForm everything prints but the graph.
(I use VB 6)
How can I get the graph printed??
ASKER
Never done this, How do I do this, where do I set this??
Form.AutoRedraw = true
or Picture.AutoRedraw = true
or Picture.AutoRedraw = true
ASKER
Adjusted points from 200 to 300
ASKER
Same problem remains! No printing of lines in picture box.
You are correct, i never tried to print lines in a picturebox, but it works fine when you paint on the form (but i think you don't want this).
You might then try to have a form instead of the picturebox (no border, nor resizable)
I found the article ID: Q77060 in the MSDN how to print the picturebox using API, but you certainly want to print the whole form...
You might then try to have a form instead of the picturebox (no border, nor resizable)
I found the article ID: Q77060 in the MSDN how to print the picturebox using API, but you certainly want to print the whole form...
How about using the printer.line method as you do on your picture box. I never use the printform method to avoid problems as you are encountering. A better way of printing is to do what you did on the picturebox exactly the same on the printer object. It takes some more effort, but once you get used to it you will see that the results are better.
Look at the PaintPicture method to print a Picture box. It has the advantage of allowing you to locate and size the final printout on the paper.
But if you want to get the best looking printout, draw directly to the printer and get the benefit of the higher printer resolution.
But if you want to get the best looking printout, draw directly to the printer and get the benefit of the higher printer resolution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hope this helps