pro_vb thread: printing direct to printer.
The method you specify below should always work as long as LPT4: is defined.
Your problem is that you are not making one of the printers the default DOS
printer. Unless one of the printers is made the DEFAULT DOS PRINTER, there
is no printer device for LPRINT to use. Take another look at your WIN98
computer -- assign the printer of your choice as the DEFAULT DOS
rinter. -- Or use the LPTn: printer handle as you proposed.
----- Original Message -----
From: <simon@s...>
To: "professional vb" <pro_vb@p...>
Sent: Monday, November 18, 2002 3:15 PM
Subject: [pro_vb] printing direct to printer.
> Hi there
>
> i'm having problems printing direct to a printer from visual basic on
> windows 98 machines.
>
> These are network shares that i print direct to - it works fine from
> windows nt, but on windows 98 i get file not found.
>
> - The printer ports are captured on nt by the command
> "net use lpt4 \\mail\eltron"
>
> on windows 98 this is done through network neighbourhood (as advised on
> microsoft.com) (i tried the other way aswell)
>
> the code below works fine on nt, but on 98 it just returns "File not
> Found" as an error.
>
> Open "LPT4:" For Output As #1
> print #1, "test"
> close #1
>
> i've tried printing to nt hosts and windows98 hosts - both work printing
> form nt, but neither works from 98.
>
> Is it not possible to print this way on 98?
>
> Cheers
> simon