I am using the code below to open the printer selection screen. when using it an a network

I have to unload my program after making a selection and then restart my program for the printer selection change to take effect.

any ideas on why this is happening? it used to work fine until an IT guy made some changes in the network some time back.


CommonDialog1.ShowPrinter

Do u have any difault printer on the pc.
You better consult the person who made the changes.

yes, there is a default printer.

before we complain to the IT guy I was just checking to see if anybody had any ideas.

do you have this line in your code

Printer.KillDoc

I was not aware that I had to use KillDoc in relation to the showprinter.

would I need that command before or after the printer dialog is on the screen?

This is how I work:

CommonDialog1.ShowPrinter
Printer.Print Tab(10); "Something"
Printer.KillDoc

when printing is finished, I use


Printer.enddoc

I didn't use enddoc so far.
Does it work to you killdoc?

KillDoc is to stop a printing in progress, Enddoc is when you have finished sending all data to the printer, it resets the printer and gets it ready for teh next printing session.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.