473,396 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2330
* "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Isaac | last post by:
I'd like to try personal financial management using Python. I just found PyCheckbook, but it does not support check printing. Is there a Python check printing application kicking around? Thanks,...
8
by: David Isaac | last post by:
"Alan Isaac" <aisaac0@verizon.net> wrote in message news:_A34e.2207$1r6.248@trnddc02... > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not...
1
by: Dave | last post by:
Hi, Can anyone direct me to any articles on the best way to give a print option in VB & ASP .net Cheers
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
2
by: gerb | last post by:
Hello, I realise this is not a pure Javascript question, and that VBscript is probably involved at some point, though not as much as I fear. If you opened this item looking for a pute Javascript...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
10
by: Mtek | last post by:
Hi, I have a web page with some drop downs. Once the user makes his selections the bottom half of the page is populated. When that happens, I want to create a formatted report in a hidden div....
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.