Setting application default printer and setting its properties (VB5) 
Author Message
 Setting application default printer and setting its properties (VB5)

Could anybody help me in my researches?
Using standard method I select the printer which is not system default. Then
I try to change its properties (eg Orientation and PaperSize ) . After it
printer is ressetted to system default.(???). Code example which makes such
things:

'Now Printer.DeviceName ="HP LaserJet 4"
Dim i as integer
for i=0 to Printers.Count-1
 if Printers(i).DeviceName="Epson FX-100" then
  Set Printer=Printers(i)
 exit for
end if
Next i
'Now Printer.DeviceName ="Epson FX-100"
Printer.PaperSize=vbPRPSA4
'Now Printer.DeviceName ="HP LaserJet 4" again (????)

Additional information: VB5.0 SP1 (I tried VB5.0 sp2 and VB 6.0, but no
differencies), Win95 OSR2.1(russian, but in english and japanese it does not
work either).
I know that it possible to print using API, but it is too difficult for me.
Are there other solutions (Service packs, ActiveX etc)

Thank you for your help




Mon, 13 May 2002 03:00:00 GMT  
 Setting application default printer and setting its properties (VB5)
setting default printer during programming does not seem to work in the ide,
try compiling into .exe should work ok there


Quote:
> Could anybody help me in my researches?
> Using standard method I select the printer which is not system default.
Then
> I try to change its properties (eg Orientation and PaperSize ) . After it
> printer is ressetted to system default.(???). Code example which makes
such
> things:

> 'Now Printer.DeviceName ="HP LaserJet 4"
> Dim i as integer
> for i=0 to Printers.Count-1
>  if Printers(i).DeviceName="Epson FX-100" then
>   Set Printer=Printers(i)
>  exit for
> end if
> Next i
> 'Now Printer.DeviceName ="Epson FX-100"
> Printer.PaperSize=vbPRPSA4
> 'Now Printer.DeviceName ="HP LaserJet 4" again (????)

> Additional information: VB5.0 SP1 (I tried VB5.0 sp2 and VB 6.0, but no
> differencies), Win95 OSR2.1(russian, but in english and japanese it does
not
> work either).
> I know that it possible to print using API, but it is too difficult for
me.
> Are there other solutions (Service packs, ActiveX etc)

> Thank you for your help





Tue, 21 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Setting via API the default printer settings

2. Set Printer properties (papersize) for default system prnter

3. Setting network printer default properties

4. Setting the default printer for the application

5. Setting Default Printer in VB5

6. Setting default printer in VB5

7. SET DEFAULT PRINTER IN VB5

8. VB5 and setting the Default Printer

9. Setting the default printer in VB5

10. Problem setting the active printer of Word 97 without changing the Windows default printer

11. Printer Dialog sets System Wide Printer settings....

12. Printer Dialog sets System Wide Printer settings....

 

 
Powered by phpBB® Forum Software