Solved

Printing a graph

Posted on 2000-05-11
6
237 Views
Last Modified: 2008-02-26
I am using Pinnacle-BPS Graph Control. In the properties, I can either Copy, Print or Write. The Copy and Write actions work fine - but it does not print. The screen gives a quick flick as though something is happening, but does not print.

I know I can print using FormPrint, but I should be able to get better resoultion using the control (as they say) and it should work!  Any suggestions?
0
Comment
Question by:Wicksy
6 Comments
 
LVL 28

Expert Comment

by:Ark
ID: 2802559
Hi
Haven't this control, so some common advices:
Try to initialize printer before printing:
Printer.Print ""
Which parameters do you pass to Print method?
Cheers
0
 

Author Comment

by:Wicksy
ID: 2809395
Printer.Print "" has made no difference. To make the graph print, one sets the DRAWMODE=5 and that's it. To copy to the clipboard, DRAWMODE is set to 4 (and this works fine).
0
 

Expert Comment

by:leveller225
ID: 2827911
hello

i've used the Pinnacle-BPS Graph Control and never recall having had any problems.  this code seemed to work ok.

' set paper orientation
Printer.Orientation = vbPRORLandscape
printer.FontTransparent = False
Printer.Font = ""
Printer.Print
Printer.ScaleMode = Twips
' print info for control
frmFTMain.graphFractures.PrintInfo(1) = Printer.hDC
frmFTMain.graphFractures.PrintInfo(6) = Printer.ScaleLeft
frmFTMain.graphFractures.PrintInfo(7) = Printer.ScaleTop
frmFTMain.graphFractures.PrintInfo(8) = Printer.ScaleWidth
frmFTMain.graphFractures.PrintInfo(9) = Printer.ScaleHeight
frmFTMain.graphFractures.PrintInfo(2) = 1.25 * 1440             ' x coord top left of graph
frmFTMain.graphFractures.PrintInfo(3) = 1.75 * 1440             ' y coord top left of graph
frmFTMain.graphFractures.PrintInfo(4) = 8 * 1440                ' graph width
frmFTMain.graphFractures.PrintInfo(5) = 6 * 1440                ' graph height
' print mode
If gColorPrintMode = False Then
frmFTMain.graphFractures.PrintStyle = G_MONO                 ' 0
    Else
frmFTMain.graphFractures.PrintStyle = G_COLOR                ' 1
End If
' setup fonts
frmFTMain.graphFractures.FontUse = 0
frmFTMain.graphFractures.FontSize = 75
frmFTMain.graphFractures.FontUse = 1
frmFTMain.graphFractures.FontSize = 50
frmFTMain.graphFractures.FontUse = 2
frmFTMain.graphFractures.FontSize = 50
frmFTMain.graphFractures.FontUse = 3
frmFTMain.graphFractures.FontSize = 50
' send graph
frmFTMain.graphFractures.DrawMode = G_PRINT                     ' 5
Printer.EndDoc

good luck
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 1

Accepted Solution

by:
csameer1 earned 100 total points
ID: 2843576
i have not used that control before.

For charting may i suggest teechart control from www.teemach.com,you dont need to code for print preview,print,save,recall etc

Another method i have used before (mscharts if i remember right)is copying the chart onto the clipboard and PaintPicture it onto the printer or image/pic controls to printer.
0
 

Author Comment

by:Wicksy
ID: 2857313
Answer accepted
0
 

Author Comment

by:Wicksy
ID: 2857314
Thanks for your help everyone, I think the problem was in the control. I managed to get an upgrade and this fixed the problem ....!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exit a vb6 apps when a calling it apps closes 15 53
Help me. 3 60
Advice in Xamarin 21 97
how to loop through and process two columns in excel 8 26
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question