I am using PrintPreview in VB.Net (VS2005) in a program that I am migrating from VB6. I reference PP by a reference to interop.preview5.dll. The only problem I have is that I can't get the print to file button to show I have the following code ppr.ShowPrintToFile = True ppr.ShowExportList = PrintPreview5.ePreviewExport.prELPDF Or PrintPreview5.ePreviewExport.prELRTF Or PrintPreview5.ePreviewExport.prELText
I have inserted the code just after the call to validate my license. My printer is an HP5900 and I run in WinXP Pro. I have included the rest of the code (minus the validation code)
Since I posted this message I have tried emailing my print as a PDF file. In VS2005 the dialogue box came up as usual but when I tried to send it the dialogue became hidden but I received no confirmation that it had been sent. I tried this in the VB6 version and it worked fine.
Hi Waty Yes I do have VB6 and VS2005 on the same machine. I point VB6 to program files\mandix\PrintPreview5.dll and .Net to interop.PrintPreview5.dll which I created by adding you ocx as a com object. This creates the interop file in the obj folder of the project.
As my project is rather large (27MB) I have filletted out all but the essential code so that it will run. All it needs is a blank form with a command button. Add the attached click method. When activated it will draw a grid to the PP5.
You will see that the email list has been setup ok but the save to file button does not appear