Print Preview ActiveX Active Users: 17 / Visits Today: 107
Highest Active Users: 17
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Sample of use in other langages than VB
 ShowPrintToFile
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic: Sample of use of Print Preview in VBA Topic Next Topic: Sample of use of Print Preview in Access  

David Hancock
Starting Member

United Kingdom
9 Posts

Posted - 07/16/2006 :  12:52:51  Show Profile  Reply with Quote
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.

Edited by - David Hancock on 07/16/2006 16:57:30
Go to Bottom of Page

Waty Thierry
Forum Admin

Belgium
635 Posts

Posted - 07/25/2006 :  13:03:23  Show Profile  Visit Waty Thierry's Homepage  Reply with Quote
Do you have VB6 and VS2005 on the same computer?
Maybe some DLL or OCX missing?

Otherwise, send me your VS2005 project.
I will debug it (I have just installed VS2005)

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com
Go to Bottom of PageGo to Top of Page

David Hancock
Starting Member

United Kingdom
9 Posts

Posted - 07/31/2006 :  13:18:47  Show Profile  Reply with Quote
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
Go to Bottom of PageGo to Top of Page

Waty Thierry
Forum Admin

Belgium
635 Posts

Posted - 08/03/2006 :  20:58:07  Show Profile  Visit Waty Thierry's Homepage  Reply with Quote
I suggest to use the DLL instead the OCX.
The OCX is just a wrapper arround the DLL, mainy used in some languages that doesn't allow DLL (Powerbuilder...)

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com
Go to Bottom of PageGo to Top of Page
  Previous Topic: Sample of use of Print Preview in VBA Topic Next Topic: Sample of use of Print Preview in Access  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Print Preview ActiveX © Mandix Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.02