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. GDI+ Dashed line

GDI+ Dashed line

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

    Does anyone know how I can draw a dashed or dotted line. I dont seem to be able to get amywhere using System.Drawing.Graphics short of drawing lots of little line. This can be right. tia gadget www.FUXUP.com[^]

    H 1 Reply Last reply
    0
    • G gadgetfbi

      Does anyone know how I can draw a dashed or dotted line. I dont seem to be able to get amywhere using System.Drawing.Graphics short of drawing lots of little line. This can be right. tia gadget www.FUXUP.com[^]

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      You set it in the Pen that you use to draw (the first parameter in all overloaded Graphics.DrawLine methods). There are many properties (mostly, DashStyle) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      D G 2 Replies Last reply
      0
      • H Heath Stewart

        You set it in the Pen that you use to draw (the first parameter in all overloaded Graphics.DrawLine methods). There are many properties (mostly, DashStyle) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        D Offline
        D Offline
        Daniel M Edwards
        wrote on last edited by
        #3

        If you still have any questions about what all the options are you can check the following article out on the MSDN. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingpenclasstopic.asp

        1 Reply Last reply
        0
        • H Heath Stewart

          You set it in the Pen that you use to draw (the first parameter in all overloaded Graphics.DrawLine methods). There are many properties (mostly, DashStyle) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          G Offline
          G Offline
          gadgetfbi
          wrote on last edited by
          #4

          Thanks, I new there was a way - I just couldnt find it.

          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