469,903 Members | 1,520 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Printing question

Hi!

I have barcode printer attached to the printing server's COM1-port, and this
printer is shared in path like \\MyServer\Intermec

I have text-file containing barcode script in file barcode.txt, and I can
print it using DOS-window from XP like ...

copy barcode.txt \\MyServer\Intermec ... and it's working fine.

I have also made earlier PHP-script for printing same script to the same
shared barcode printer. It contains only few lines of code like this way ...

function print_labels($script)
{
$handle = printer_open("\\\\MyServer\\Intermec");
printer_write($handle, $script);
printer_close($handle);
}

Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer path
into the app.config-file) ?

--
Thanks in advance for any reply!

Mika
Nov 21 '05 #1
2 2105
* "Mika M" <mika.mahonen@nospam_kolumbus.fi> scripsit:
I have barcode printer attached to the printing server's COM1-port, and this
printer is shared in path like \\MyServer\Intermec
[...]
Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer path
into the app.config-file) ?


HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;322090>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Thanks Herfried!

Yes I got it and noticed your answer already yesterday, but was little
astonished how long strange looking Class code is needed for such a simple
task as sending a string to the printer with .NET after using PHP - oh
boys!!! How "awerage programmers" can "guess" such a code >:)
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OD*************@TK2MSFTNGP12.phx.gbl...
* "Mika M" <mika.mahonen@nospam_kolumbus.fi> scripsit:
I have barcode printer attached to the printing server's COM1-port, and
this
printer is shared in path like \\MyServer\Intermec
[...]
Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer
path
into the app.config-file) ?


HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;322090>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Isaac | last post: by
8 posts views Thread by David Isaac | last post: by
1 post views Thread by Dave | last post: by
9 posts views Thread by Jody Gelowitz | last post: by
6 posts views Thread by Chris Dunaway | last post: by
10 posts views Thread by Mtek | last post: by
18 posts views Thread by Brett | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.