Send A Simple Binary String To A Printer Port Such As "00000011"?
Jul 3, 2009I need to be able to send a binary string such as 00000011 to a printer port using visual basic.
View 14 RepliesI need to be able to send a binary string such as 00000011 to a printer port using visual basic.
View 14 RepliesI am currently sending data via a serial port to an AVR microcontroller. I've tried searching the forums here first but haven't found any posts that specifically deal with what I'm trying to do. Here's some additional information that might help before proceeding:
Sendbox = textbox
ReceiveBox = listbox
ReceiveChk = checkbox
I currently have it setup so I enter hex data in Sendbox, click the button, it sends the data to the AVR micro via the serial port, which gets repeated back through the serial port and receives the hex data in the ReceiveBox. I want to be able to setup something similar so I am able to input data into a textbox as binary and have it sent to the AVR that way.
I realize it will send the same data whether I enter it in hex or binary form. I just want the option of being able to send it in either form.
Below is my code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendButton.Click
SerialPort1.Open()
[Code]....
I have designed a label using "ZebraDesigner_XML_V2.exe" and uploaded it to a Zebra S4M printer.
Then in my application I have built the following XML string.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels _FORMAT="E:INFORMAT.lbl" _QUANTITY="1" PRINTERNAME="ZDesigner S4M-203dpi
[Code].....
I am trying to send a control string from VB.NET to a serial port. I am using a pololu trex jr. on the receiving end of the serial port. I have attached a copy of my current code which compiles without errors, but fails to send data. I can tell that it is not sending data because I have a light on the control board connected to the port and it normally blinks when data is received. The program that came with the board drives it perfectly but does not serve the purpose I need it to. I am open to any suggestions as I eventually plan to write a class to contain the control routines.
View 12 Repliesi knew Serial ports are a type of computer interface that complies with the RS-232 standard. They are 9-pin connectors that relay information, incoming or outgoing, one byte at a time. Each byte is broken up into a series of eight bits, hence the term serial port.And I want to write a program chatting through Serial Port.
View 3 Repliesim very new to visual basic. as in i just started 2 days ago. Currently i have a little program written up that has a couple of radio buttons and then a submit button. when you select a radio button and click the submit button, a little message box with pop up and say "you selected such and such"
Well now im trying to make something that will send a string to arduino through the usb cable. Basically it will use the same set up as stated above but instead of a pop up message it will just send the string through the port. for example Radiobutton1 - when selected and submit button pressed will send "1" (no quotes) through the serial port Radiobutton2 - when select and submitted will send "1" and then maybe "3"
and so on and so. Some radio buttons will only send 1 string through them and some may send multiple. Now, i dont need help with arduino, i have that already set up to wait for the strings to come through the com port. just need to figure out how to do it in VB.
How can i send byte/signal/puls usb port?i want to this
View 3 Repliesim trying to create a simple program that send string data through winsock, there are hundresd of tutorials allover the web, but non of them seem to work! I am fairly new to visual basics but i undersatnd the consept of winsock and 'all that stuff'. [code]
View 5 RepliesI have a label printer (Argox 1000-x) and i want to print some datas on it. And this printer is connected to my computer via the COM1 port. I can open/write COM1. And when i send some data to printer through COM1, Label Printer's Ready Signal Led will be ON/OFF. But it does not print anything or any label..
View 5 RepliesI wish to send a string held in a var to an IP address and Port number both also held in vars. I also wish to listen to a signals coming in on a particular port number so when particular strings are received I can trigger other transmissions.
View 2 Repliesi need to know how to call the printer port using vb .i'm designing a toy car that can be controlled using the printer port.
View 8 RepliesI'm trying to find a way to refresh the network IP of a printerport.as some smart cleaner at the office has figured out how to unplug stuff so she can use the vacumcleaner this networkprinter goes crazy and never gets back in the network correctly. to get around this i have to reboot our server which then reconnects the networkprinters. as i dont like to reboot this server at a almost daily base. im trying to find a way (preferably VBS) to get this done.
View 3 RepliesIn VB6, when I wanted to print text, I would do something like this...
Dim TextToPrint as string
TextToPrint = LastName(1) & ", " & FirstName(1) & " " & G(1,1) & " " & G(1,2) & " " & G(1,3) & vbCrLf
TextToPrint = LastName(2) & ", " & FirstName(2) & " " & G(2,1) & " " & G(2,2) & " " & G(2,3)
TextToPrint = LastName(3) & ", " & FirstName(3) & " " & G(3,1) & " " & G(3,2) & " " & G(3,3) & vbCrLf
Printer.Print TextToPrint
What's the equivalent in VB 2010?
I have a program that connect to 2 printers at the same time. Ribbon Printer and Label printer.
I have set the ribbon printer to be the default printer of the server so that normal document printing can be printed using it. This is very simple and i already finsih the code for it.
However i have a Parallel printer at Port LPT1 which i wish to use it to print label. I have search online but find no solution on how to open connection to LPT1 and print the document in coding.What i can find i only send a window command to the port LPT
i want to print text to the printer port. what is mean invalid handle parameter name:handle ?
code is
Public Class Form1
Public Class Win32API
Public Const GENERIC_WRITE = &H40000000
[Code]....
I need to print a simple receipt to my EPSON-TM-T88V thermal POS printer with VB.NET 2010 on XP (eventually to run on Windows embedded POSReady) via USB.All I need to print is some text and a logo. I have my logo stored on the printer. So, I need to use Epson's ESC/POS commands. So, does it make sense to use Microsoft.PointOfService? Seems like a lot to go through to send some escape sequences to a printer!Apparently, the PointOfService system has not been updated to work seemlessly with VB.net 2010 (details below) That is why I wonder if I am taking the wrong path.IF this is the right path...here is what I did and where I am stuck.
For people trying to us the PointOfService classes in VB 2010:First you need to download and install the POS.net (Microsoft.PointOfService) - free download MS. Then you need to add references in your vb.net project. When you try to run it, you will probably get an error something like this:
{"This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch.
[code]...
A few months back I wrote a VB.net console application to migrate a group of about 100+ printers and the 1800+ users that use them from some old HP print appliances to a mixed Print Server and Direct to IP Printing solutions. The application uses a database to compare installed printers and remove old/invalid shares and remap to the new Win2K3 based print server OR create a TCPIP printer port and install the driver for direct to IP printing.
It worked really well, but users needed power user rights to create the TCPIP printer port. For the main campus this wasn't an issue, but the smaller remote sites need a solution that allows the app to be run by users without power user rights.
My solution was to take the "CreatePrinterIPPort" function and put it into it's own wrapper app and then call it as needed from the main app using a hard coded local admin account for the purpose, but I'm running into issues when spawning the createport app. If I run the app standalone it creates the port with no issue, but when I run it in my test app to spawn the createport using the CreateProcessWithLogon API the port creation fails with an "access denied" error. I'm limited to using .net 1.1 as 2.0 isn't in our environment throughly and I was told it wouldn't be pushed just for this app.
[Code]...
I'd try programming in vb.net with a usb to parallel printer but it doesn't appear as LPT Port Device. It show as a USB Printer Support in USB Controller. Just to receive and send a bit in different pin to be in servo controller/driver.
View 4 Repliesim interested on electronic and i working on my final project i not to experienced at VB so can anyone figuring this out i really need this , if there was any advance from this forum.
View 2 RepliesI am trying to read the data from a device on a serial port. I connect just fine and can receive data fine in text mode but not in binary mode. I am using VB.NET express. I am at the point in my code where I know that the device is sending 1056 binary bytes of data. How do I go about storing this is a binary array? After I have the array stored (which I dont yet) I need to go through the array and convert the binary to integers. They are 2byte integers in the format: 8bit MSB|8 bit LSB.
View 5 RepliesI've exported a print to a file PRN, I want to divide the file and send it like this to printer part1.prn+part2.prn+part3.prn.
How can I send this files to the printer.
on dos I can do COPY part1.prn+part2.prn+part3.prn LPT1 in vb.net?
Isn't there a way to send an MS Word doc to a printer in VB.net? We generate dozens of Word docs for our clients daily, and would like to create a simple app that will list the files in a selected folder and allow them to highlight as few or as many as they want and send them to their default printer.
[Code]...
My printer is a ZEBRA TLP 3742, and dont have memory for graphics, so i've printed the label to a .prn file where I can see commands, and write them in VB commands
The graphic part of the file is in HEX I think, so how can I send it to the printer ? i've tried by "print.Write" but dont work since it wants a String [code]...
there is a possibility to send Files to a printer which is connected to a virtual LPTx, e.g. "copy filename lpt1". Is it possible to make this WITHOUT a LPTx? A solution in vbScript would be great, but VB is also OK.
View 1 RepliesI need to create an exe in VS2010 with VB that does the same thing as a simple command line. The reason is related to debugging. I can type ECHO ~ > \WIN7MMF25$ in a command window on a W2K8R2E server and it will send the ~ character to the shared "printer" on the Win7 PC. Actually, the device is a cash drawer connected to LPT1 that pops open when it sees a ~ character.
Anyway, I created a CMD file with that command, saved it, fired it, and the cash drawer on the Win7 PC opens. However, when I try to call that command file from our ERP application, it doesn't work (it does work if the remote PC is XP, though - just not if it is Win7 or Vista).
Anyway, I was hoping if I created a simple EXE and called THAT from the ERP software, perhaps whatever issue is bugging us will not bug us anymore.
I'm not sure if this is the best forum for this question but it seemed like the most applicable. I am using VBA to create a barcode label application that sends a series of ZPL (Zebra programming language) commands to a USB printer.I need this program to be stand alone in the sense that the Excel 2007 workbook that I am embedding the macro in and the printer driver are the only software that will be required to sucessfully run this program on various computers that have Excel 2007 installed. Additionally I need this program to work directly with the USB port and not a serial/ usb converter. Can someone help me, or direct me to help, to perform this kind of operation? I used to be able to read and write to serial/ parallel ports and haven't worked with USB from a programming perspective.
View 6 RepliesPossible Duplicate: .NET code to send ZPL to Zebra printers
My company has a Eltron 2543 thermal printer. I'm developing an VB.NET application incorporating FedEx web services to print off shipping labels.I can save off the data file without a problem, but I was wondering how I send this data stream to a shared printer on a network. Do I need to include the Eltron 2543 driver in my solution? I've tried haven't work so I guess I'm looking for an expert who has dealt with printers (particularly thermal) to get me moving in the right direction.
I need to be able to send a PostScript file to a printer specified by the user. I am using a print dialog box to get the printer the user selects but now I need a way to send a PostScript file to that printer. I am able to send a PostScript file to a printer right now, but it only sends the file to the printer that was last selected. I am using Ghostview to view the PS file and to print it. This is why the file prints to the last printer selected.
Here is the code I am using to print the file in Ghostview:
If PrintDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim p As New ProcessStartInfo()
p.Arguments = PrintDialog.PrinterSettings.PrinterName
[Code]....
I was just wondering how the hell you send documents of different type directly to the printer without a preview.
At first I thought this would be easy but so far I have had no joy at all.
generate receipt file and send to printer.
Here's i want to copy them as same sample receipt
My receipt has a Total Gas official receipt, customer number, station number, purchased, amount and charge
at the bottom of my receipt they have cashier and date..