Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Printing on dot-matrix printer in .NET

Printing on dot-matrix printer in .NET

Scheduled Pinned Locked Moved Visual Basic
helpcsharpgraphicssysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Derec Roofie
    wrote on last edited by
    #1

    Hi, In VB6 i use this sample of code to print directly to the printer. I mean EPSON compatibile dot-matrix printers Open “LPT1” For Output as #1 Or Open “\\Server\printer” For Output as #1 Print #1, “something i what to print” Print #1, “something else ...” .... Close #1 What I need is to open printer port (LPT1 or \\computer\printer ) like any other file on hard drive, as simple as posible. I don’t need to print any graphics, just draft (plain) text with a lot of ESCAPE sequences like Pica,Picacondesd, Elite ... When I use FileOpen(1, “LPT1”, OpenMode.Output) PrintLine(1, "This is a test.") in VB.NET I get an error Additional information: FileStream was asked to open a device that was not a file. FileStream's constructors that take a String will only work with devices that are really files. If you need support for devices like "com1:" or "lpt1:", then call CreateFile yourself then use the FileStream constructors that take an OS handle as an IntPtr. Let me know if you have any sugestions for my problem Thanks in advance p.s Sorry for my bad English Tancev

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups