tags:

views:

214

answers:

2

[Disclaimer: I looked at the related questions and could only find relevant material for MFC. I don't do C++]

I've got a C# .Net app that uses a OCX control via interop (the control being a viewer component for CGM images). The control exposes a Print() and PrintSetup() method but not a PrintPreview() method.

There's also no exposed PrintDocument object that I can use to implement this functionality.

Are there any other ways in which I can redirect to a Print Preview dialog?

[More info]In case it helps someone answer, the control in question is the Larson CGM Viewer ActiveX, also referred to as VisEx CGM. See http://www.cgmlarson.com/industry/cgm%5Fviewer%5Fcontrol.php

+1  A: 

Can you use the OCX control to save the CGM image to a temp location as a temp file and then use the winforms built-in PrintPreviewControl functionality?

Jeff Widmer
Well, the CGM file itself I already have (it's what the control is populated with).If you mean using the Print To File function to spool to a .PRN/.PS file, I can do this but not programmatically, since it depends on PrintDocument.PrinterSettings.PrintToFile being exposd
Rob Cowell
+1 fopr being the only one to give this a shot....
Rob Cowell
A: 

In the end I spoke to the vendor - they have a desktop product that they use their own control in (aka eating their own dogfood) and even they don't have Print Preview functionality.

I'm not gonna jump through hoops to get a feature even the vendor doesn't provide or support - much as I hate telling end users something can't be done.

Rob Cowell