Marc,
>SetPrintDefault() really change my defaultprinter. This is not the problem. As I already told in my previous message. If I launch the program, than change the default printer manualy (via printer configuration) and than print, the program print to the printer that was the default one BEFORE launching my program. So the SetPrintDefault() have also no effect.<
When you say, "change the default printer manually (via the printer configuration" do you mean via the Windows Control Panel? If so, that is the way things are supposed to work. The same would be true if you called SetPrintDefault() from within the program--I expect. I have not used it, but I presume it is changing the Windows default printer.
When an app runs it picks up the current Windows default printer as defined in the Windows Control Panel. That printer is now the application's default printer until or unless it is changed from
within the application. You can do this via the setPrinter() function which calls up the Windows common control to set the printer. This function is normally called from the File-Printer Setup menu. Note that this function only changes
the application's printer not the Windows default printer.
Changing the Windows default printer from the Control Panel while a application is running will not change the application's current default printer. The application will pick up that printer the next time it is run, however.
Note: I suggest that you should never change the Windows default printer from within an application. This will probably confuse and irritate the user. If you have a need to default your application to the same printer each time it is run, you can get code to do this on my website on this page. I have not tested it under 16bit however. Look under the Downloads section for "Saving and restoring the application's printer."
http://ourworld.compuserve.com/homepage ... rogram.htm
I hope that helps.
James