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. C#
  4. code

code

Scheduled Pinned Locked Moved C#
csharphelp
3 Posts 2 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.
  • H Offline
    H Offline
    help as an alias
    wrote on last edited by
    #1

    Hi all , Please help me i m writing the code in VB6 Plz give me same code in C#. Open "lpt1" For Output As #1 Print #1, Chr(27) & "@" 'Initialize printer 'Print #1, Chr(27) & "A" & Chr(15) ' set to 10/72" Print #1, Chr(27) & "M" Close #1 thanx in advance..:)

    help as a alias. Be happy and make others happy.Cheer up...........

    L 1 Reply Last reply
    0
    • H help as an alias

      Hi all , Please help me i m writing the code in VB6 Plz give me same code in C#. Open "lpt1" For Output As #1 Print #1, Chr(27) & "@" 'Initialize printer 'Print #1, Chr(27) & "A" & Chr(15) ' set to 10/72" Print #1, Chr(27) & "M" Close #1 thanx in advance..:)

      help as a alias. Be happy and make others happy.Cheer up...........

      L Offline
      L Offline
      Lutoslaw
      wrote on last edited by
      #2

      System.IO.StreamWriter writer = System.IO.File.CreateText("lpt1");
      // Use Writer
      writer.WriteLine("@");
      writer.WriteLine("A" + ((char)15).ToString());
      writer.WriteLine("M");

      writer.Close();

      Not sure about this, didn't test. Next time write: "How to write to a file in c#", instead of "Give me a code", because people here usually do not like to "give a code" :)

      Greetings - Gajatko

      H 1 Reply Last reply
      0
      • L Lutoslaw

        System.IO.StreamWriter writer = System.IO.File.CreateText("lpt1");
        // Use Writer
        writer.WriteLine("@");
        writer.WriteLine("A" + ((char)15).ToString());
        writer.WriteLine("M");

        writer.Close();

        Not sure about this, didn't test. Next time write: "How to write to a file in c#", instead of "Give me a code", because people here usually do not like to "give a code" :)

        Greetings - Gajatko

        H Offline
        H Offline
        help as an alias
        wrote on last edited by
        #3

        thankx gajatko , i like your advice.:):rose::cool:

        help as a alias. Be happy and make others happy.Cheer up...........

        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