473,569 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing question

Hi!

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

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\Inte rmec ... 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($s cript)
{
$handle = printer_open("\ \\\MyServer\\In termec");
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 2355
* "Mika M" <mika.mahonen@n ospam_kolumbus. fi> scripsit:
I have barcode printer attached to the printing server's COM1-port, and this
printer is shared in path like \\MyServer\Inte rmec
[...]
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.microso ft.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******** *****@TK2MSFTNG P12.phx.gbl...
* "Mika M" <mika.mahonen@n ospam_kolumbus. fi> scripsit:
I have barcode printer attached to the printing server's COM1-port, and
this
printer is shared in path like \\MyServer\Inte rmec
[...]
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.microso ft.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
2048
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, Alan Isaac
8
2408
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 support check printing. > Is there a Python check printing application kicking around? OK, I'll assume silence means "no", so new question: What...
1
347
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
4094
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 PrintDialog control under a security setting with only SafePrinting allowed. I have attached a sample project that I am using to try to accomplish...
2
12463
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 question, I'm sorry. For an IE6 intranet application I'm running into some problems regarding printing screens from the browser. The specs...
3
6279
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 computer has drivers installed for this printer, and this printer is shared for the network. Question 1:
6
3234
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 (much like the current model), but my PrintDocument would have a Pages collection such that each time you need to have an additional page, you would...
10
1548
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. When the user clicks the print button, I want to print only that hidden report...... Can anyone help me with this?
18
11271
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 classes, for each of the checked rows in the GridView. This works fine in the Visual Studio 2005 development environment on localhost. But, when I...
0
2828
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 printing printing data and the actual database data in a recordset. the class looks like this: Public Class BRPDD 'Balance Report PrintingDocument Data ...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.