Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems printing CWGraph

I'm using VB6 with the CWGraph control (Componentworks 3.01). The graph looks great on the screen, but sending the controlimage to the printer does not look right. The vertical axis label looks terrible, like it is a bitimage graphic that was not scaled properly. Regardless of what color I set, either in the caption color or label color properties, it always prints black. The horizontal axis label/caption is fine.

This is not a problem with a printer driver. I have the same problem if I send the controlimage to a picturebox, or if I save the controlimage directly to a file. Even the printform method has the problem.

I don't mind spending the money to upgrade to the current version, but I don't want to spend several hundred dollars just to
find out if this has been fixed.

Thanks in advance.

Bob.
Message 1 of 5
(6,514 Views)
Hi Bob,
The vertical axis label problem is a natural byproduct of converting a control to a Windows Meta File. The horizontal text of the X axis is converted as text, but the vertical text must be converted into an image. This is an inherent limitation, but some fonts look better than others, and a larger label will generally look better than a small one after conversion.
The new version of Measurement Studio is for Visual Studio .NET, which makes it quite a bit different, but it is indeed possible to get around this problem in it.
0 Kudos
Message 2 of 5
(6,514 Views)
I think I understand the problem, I just think a better job could have been done calculating the space needed in the metafile for the converted/rotated text. And I don't see why the text color has to end up black regardless of what the color property is set to.

You say the "new version" is for .NET, but you do have a current version for VB6. I downloaded the evaluation copy and will try to install it in a scratch partition sometime so I can try it out. I gather from your answer that it will probably do the same thing.

I think the workaround for me is to not use the captions for the vertical axes, but to use a seperate legend next to the graph.

Thanks for your help.

Bob R.
0 Kudos
Message 3 of 5
(6,514 Views)
You are correct, you will see the same behavior, I tested it with the newest version of Measurement Studio for VB 6. The color problem definitely seems unintentional, I will file a report on it, but since most MS development is being geared toward .NET and the problem isn't present there it's possible that a cosmetic issue like this one won't get much attention. The workaround you suggest sounds like the best solution for you.

Best of luck,
Ryan K.
0 Kudos
Message 4 of 5
(6,515 Views)
See MSDN knowledgebase article 230502 for information on how to make this work.

Using the knowledgebase article, I was able to get the results I wanted. I also added code to allow me to resize the picturebox and cwgraph during the print operation so I could get the graph to fill the printed page.
0 Kudos
Message 5 of 5
(6,514 Views)