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. Setting Left Margin when printing...

Setting Left Margin when printing...

Scheduled Pinned Locked Moved C#
questionhelptutorial
2 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.
  • G Offline
    G Offline
    gonad
    wrote on last edited by
    #1

    does anyone know how to set the left margin when printing a textfile? I have a form that prints to an Okidata 320 printer and the margin, by default, is set at 1". how can i set it to .5" on the Left margin only? protected override void OnPrintPage(PrintPageEventArgs ev) { [other code here] float leftMargin = ev.MarginBounds.Left; [etc...] } by the way, there is no way to set the margin on the okidata, nor can i move the form any farther to the right to fix this. it has to be done in the code. :) thanks. .gonad.

    G 1 Reply Last reply
    0
    • G gonad

      does anyone know how to set the left margin when printing a textfile? I have a form that prints to an Okidata 320 printer and the margin, by default, is set at 1". how can i set it to .5" on the Left margin only? protected override void OnPrintPage(PrintPageEventArgs ev) { [other code here] float leftMargin = ev.MarginBounds.Left; [etc...] } by the way, there is no way to set the margin on the okidata, nor can i move the form any farther to the right to fix this. it has to be done in the code. :) thanks. .gonad.

      G Offline
      G Offline
      gonad
      wrote on last edited by
      #2

      thank the Lord no one responded to this, because i feel really stupid. i just divided the margin by 2 to get .5". :-O float leftMargin = ev.MarginBounds.Left / 2; Thanks! :) .gonad.

      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