[Solved] Defaultprinter problems

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
howc
Posts: 7
Joined: Tue Nov 05 2002
Location: Austria

[Solved] Defaultprinter problems

Post by howc »

I'm using VC++ 6.0 not VB, Sorry to post here.

My problem is, whenever I try to print RTF with a printer, which isn't the defaultprinter, an empty file is created.
My printengine (VPE) uses the defaultprinter, whenever creating a new document. After this, I'm setting the RTFConverter via the VPEngine, which retrieves SUCCEEDED.
Result: empty file

When I'm using "SetDefaultPrinter" in my application, it works, but "RestoreDefaultPrinter" takes up to 5 minutes to succeed.

The original DefaultPrinter is a HP Laserjet (Networkprinter)

I would be happy, if at least on problem could be solved.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

You can try to set the name of the printer from inside your code, i.e: instead of printing to the default printer you can print to a specific printer and let this printer be the RTF Converter. I am not sure how this can be done from VC++ but you may want to try it.

Also, RestoreDefaultPrinter should not take 5 minutes to execute, it executes as quickly as any other function. Please check that you are calling SetDefaultPrinter Once, when launching your application and that you are calling RestoreDefaultPrinter also Once, when closing your application.

Finally depending on the version of the RTF Converter you have, you may want to try the update.

Hope this helps.
howc
Posts: 7
Joined: Tue Nov 05 2002
Location: Austria

Problems solved

Post by howc »

Our problems where a little bit deeper, than we expected.

We have an exe, which produces some RTF-Files (fast'n'furious). This exe has to be executed by a VB-program.

The executing VB-program didn't recognize when my exe finished. The programmer who commited this code, said something from API-calls, which he doesn't do anymore.

Well, everythings fine and fast!

thx & happy Christmas!
:roll:
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

So, this is solved now, great :D

Merry Christmas to you too !
Post Reply