Print To A Specific USB Port?
Dec 29, 2009
im a independent programmer and my most recent job has me doing somthing ive never had to work with before and i was hoping to get a few answers here or be pointed in the right direction
question 1
is there a way to print to a specific USB port in VB if so links to reading material or better yet code
question 2
is there a way to program to open and send and recieve information from a USB port lpt port and a serial port using VB
and if so can i again be directed to some reading material or better yet code
i understand these are not typical questions but they are a small part of a bigger whole that we are trying to implement while we look into using Vb as the language we will use
View 2 Replies
ADVERTISEMENT
Dec 31, 2008
I use the following code to print to the receipt printer on the parallel port in vb 6.0, but it seems that it doesn't work on vb.net.[code]...
View 2 Replies
Jul 21, 2011
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]....
View 3 Replies
Mar 6, 2012
I want to print the current port address of the usb stick which is connected to the computer ? By using Visual Basic 2010
View 1 Replies
May 26, 2009
How can I ask my tcpListener to listen to particular IP on specific port? I want my tcpListener to listen to the local IP of the machine. I can get the ipaddress of the pc using Dns.GetHostAddresses(). But, if pc have multiple ip's how can I know which ip address is correct? From tcpClient class I am connecting to the server. So, I know the server ip and so I want to specify ipaddress to my tcpListener class to listen on.
View 1 Replies
May 18, 2011
I'm trying to send a message to a specific IP/Port and receive a reply in an ASP.net website, i tried the method describd at the following link but it didn't work for me as you can see SocketException An attempt was made to access a socket in a way forbidden by its access permissions
View 1 Replies
Jan 15, 2010
I tried to make a winsock program.But when i run, i have a SocketException "No connection could be made because the target machine actively refuse it."Any suggestions on what i should do? Im using 17477 port.By the way Im using my own computer to test it. So i have no idea why.How should I open this specific port in my own computer?
Is it possible that I could include it to could into my program so that i don't need to open the ports of each computer? Below is my code.
[Code]...
View 6 Replies
Jul 13, 2010
I want to check if a specific TCP Port of an IP address is open.
How can I realise that?
View 12 Replies
Mar 10, 2011
I am working on writing a program that needs to send a command to a specific port on the same computer, I have that working fine. There is another piece of software running that is listening to that port for some commands (read on).
Dim myTcpClient As New TcpClient
myTcpClient.Connect("127.0.0.1", 61225)
Dim networkStream As NetworkStream = myTcpClient.GetStream()
However when I try to send a command I get no response...
Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes("0x33")
networkStream.Write(outStream, 0, outStream.Length)
networkStream.Flush()
I have been given a list of protocols that I need to send to that port. What I have been told is that the size (in byes) is 1 and the value is "0x33" with no parameters. I am completely new to sockets and sending data through tcp.
View 7 Replies
Mar 6, 2012
I have a form and i want to print a specific part how do i specify that? I have a printdocument and a printpreview
View 3 Replies
Apr 16, 2009
whether or not I can print a specific page from a .pdf?
The VB application has a folder of images, the same image has a large and a small size to accommodate for screen resolution. The application gives you the ability to print either image. Problem is that both of the images are blurry. The same image contained in the .pdf is crisp and sharp when printed from within the .pdf.
Can I have the VB application print a specific page in the .pdf? or is there a way to copy the sharp .pdf image and place it in the folder of images?
View 1 Replies
May 5, 2011
I'm sure this is a common problem, but I haven't been able to find it.
I have a website and I want the user to be able to print a rectangle on their printer that is 3.5 inches x 2 inches. Exactly (within reason).
EDIT: To clarify - I'm looking to print a bunch of multicolored Text within a rectangle that needs to be a specific physical size. I also need to print specific shapes around some of the letters.
I'd looked into some of the .NET Printing stuff and found examples of measuring/drawing strings and shapes; but I didn't see anything that would let me specify a specific size.
View 1 Replies
Jun 24, 2010
i have bin searching around the internet to find a code that helps me print to a specific printer i define within the code. i wasn't lucky to find any vb.net or c# code, i only found vb6 code. is there a way to do this in vb.net?
View 2 Replies
May 28, 2011
I am creating an application . in which clients have to enter data and view it and search it by application number and name.i want to add print form in search form in which client when search data of entered users he/she may print that form.i seen some plugins like print form, or print document , but it prints exaclt the form image etc.i donot know how to use them completely. so i wants to ask how can i print that specific area of search form ... the printed form should not be same like in the form. how can i set that this textbox data should be of this size or that lbl or picture should of of that size?
View 5 Replies
Jan 10, 2009
how can I printscreen a specific location or area in my screen that can be save in gif or jpeg files
View 8 Replies
Nov 7, 2010
im having a problem on printform1 tool in VB.NET, when i run it, it selects the whole form
PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
PrintForm1.Print()
i only want to print specific details from the texboxes, how can i do that?
View 2 Replies
Feb 20, 2009
I've had a search through a number of extremely useful articles on the forums, however rather than reinvent the wheel I thought I would ask if anyone already had what I am looking for..A simply little VB app that opens a session to a specific IP port and then writes to a test file everything it receives. If the connection drops, simply re-stablish it and keep listening for text to write to the file.
View 1 Replies
Apr 12, 2010
I am trying to implement a custom printing solution for a client. What he wants is to have one button print a certain set of info to a specific printer and specific printer tray, connected to the client machine. Another button will print a similar set of info, to the same printer, but a different tray.
One tray is preloaded with regular 8.5"x11" paper, and the other is loaded with legal paper, 8.5"x14". I've found some instructions on how to do this: [URL]. So, I've implemented the code, and am able to enumerate the printers attached to the client machine, and their trays.
I've setup some web.config settings for the client to enter the names of his printer and specific trays (in this case, tray 1 and tray 3). This code I've written runs and works correctly, printing the document without error. The problem I am having is that even though I have selected the tray for legal paper, all the info instead prints on regular paper, the printer seems to be ignoring my instruction to print onto legal paper.
Here is the code:
Imports System.Drawing
Imports System.Drawing.Printing
....
Private printFont As Font
Private ds As dsSummons
Private formToPrint As FormType
[Code] .....
I first tried "pd.DefaultPageSettings.PaperSource = PSource" but that didn't seem to work. I also tried setting "pd.PrinterSettings.DefaultPageSettings.PaperSource = PSource" but that doesn't seem to work either..
View 5 Replies
Sep 16, 2010
I want to prit a specific excel worksheet out of a work book using vb.net if that is possible.
Below is my code it searchs and opens the workbook but it print the whole Worksheets but what I want to do is print the selected sheets (commented out below). Is there a way to set the printOut so that it prints only the selected sheets? [code]...
View 5 Replies
May 1, 2009
I am trying to figure out how to print specific members of a structure when I only have to pass the structure itself i.e.
Dim Point1 as PointF = New PointF(15,30)
Debug.Print(Point1) ' This will output "{X = 15, Y = 30}" by default
I am trying to figure out how I can do the same with my own strucutres, for example:
Dim Point2 as PointF2D = New PointF2D(15,30)
Debug.Print(Point2) ' This will output "ClassName.PointF2D.Point2"
How can I get my structures, when passed to a print statement, to print specific members of that structure by default? P.S. Please give another way other than overloading the .ToString function.
View 3 Replies
Feb 1, 2011
I'm using vb2008 I have tow TextBoxes on the From. I want to print the data or the text in the Texboxes to the TextBoxes ( Address and Port ) in the LAN setting connection part of the Internet Explorer.
View 1 Replies
Mar 25, 2011
how to use vb code to code the crystal report viewer in the vb to print directly instead of view first before print from specific NAME of printer? i also need to ask how to set the printer name through in the vb code ??
View 4 Replies
Jan 2, 2012
I am trying to print ONLY specific pages (e.g only the first page) from some files but I can not get it work. [code]...
View 2 Replies
Jul 6, 2011
Ypos = TopMargin + Count * PrintFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString(ROData(x, 3), PrintFont, Brushes.Black, LeftMargin, Ypos, New StringFormat())
Count = Count + CInt(ROData(x, 4))
The above line prints the data contents of the ROData array in position three. I would like to be able to assign a specific position accross the line to have the printer print the data at without left padding the array data.
View 1 Replies
Nov 27, 2010
I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port
View 7 Replies
Jul 25, 2011
I have a Windows form.in windows form have a combo box that give me a list of available port serial with it code (Dim ports As String() =SerialPort.GetPortNames())for example( Com1,Com8,Com15,...).but I want to give me fullname of serial port in device manager for example in dvice manager is these (Comunication Port(COM1) - Printer Port(LPT1) And USB Serial Port(COM8)).how to Get it?
View 2 Replies
Jun 9, 2010
I would like to detect the Address and Port number of the Parallel Port in computer.
View 4 Replies
Aug 2, 2011
If I uninstall the COM1 and reboot, it works. If I shut down (power off) and restart, I get the message below. If I uninstall then click on Scan for Hardware Changes,The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name:portName
View 8 Replies
Oct 20, 2011
I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay
"01+//" - Relay 1 is switched ON
"01-//" - Relay 1 is switched OFF
"02+//" - Relay 2 is switched ON
"02-//" - Relay 2 is switched OFF
[code].....
So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!
View 1 Replies
Oct 20, 2011
I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay I was following what the guy in the post was doing to turn his on:
[Code]...
View 6 Replies