Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart Print Problem

Status
Not open for further replies.

norason

Programmer
Jan 28, 2009
139
US
When I print the graph, everything prints ok except the Legend. It shows the style of line, but then prints C1, C2... instead of the text it shows on the screen, .Item(1).LegendText = "Flow Data" for example.

Why?

Here's the print routine:

Private Sub CmdPrint_Click()
' Copy bitmap to clipboard
Form1.MSChart1.EditCopy
Printer.Orientation = vbPRORLandscape
MsgBox "Press OK to Print", vbExclamation, "PRINT GRAPH"
Printer.Print " "
' copy bitmap from clipboard
Printer.PaintPicture Clipboard.GetData(), 0, 0
Printer.EndDoc
End Sub

Here's where I have the legend text and pen style.

With .SeriesCollection
.Item(1).LegendText = "Flow Data"
.Item(2).LegendText = "#1 Low Limit"
.Item(3).LegendText = "#1 High Limit"
.Item(4).LegendText = "#2 Low Limit"
.Item(5).LegendText = "#2 High Limit"
.Item(6).LegendText = "#3 Low Limit"
.Item(7).LegendText = "#3 HighLimit"
.Item(2).Pen.Style = VtPenStyleDitted
.Item(4).Pen.Style = VtPenStyleDitted
.Item(5).Pen.Style = VtPenStyleDashed
.Item(6).Pen.Style = VtPenStyleDitted
.Item(7).Pen.Style = VtPenStyleDashed

Thanks,

Gary

 
Oops, I was a little premature in posting this question. After I re-phrased my Google search, I found out that this is a bug in VB6. The fix appears to have some limitations also, so I'll just live with this problem.

Thanks,

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top