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. Other Discussions
  3. IT & Infrastructure
  4. PRINT HEADER

PRINT HEADER

Scheduled Pinned Locked Moved IT & Infrastructure
graphicshelptutorial
3 Posts 3 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.
  • N Offline
    N Offline
    Nishad85
    wrote on last edited by
    #1

    can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }

    M L 2 Replies Last reply
    0
    • N Nishad85

      can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Can you add the underline style to the font? Font font = new System.Drawing.Font(family,size,FontStyle::Underline); Why not ask your question on the appropriate message board for the language you're using? :) Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • N Nishad85

        can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, measure the width of the header (g.MeasureString), and draw a line (g.DrawLine) of that length at an appropriate point. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


        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