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. Problem in GDI+

Problem in GDI+

Scheduled Pinned Locked Moved C#
csharpwinformsgraphicshelp
11 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.
  • V Offline
    V Offline
    vinay_K
    wrote on last edited by
    #1

    Hi.. I need to draw a dotted Sine wave using GDI+ concept in Visual C#, please let me know which GDI+ Object i need to use.. replay asap

    S 1 Reply Last reply
    0
    • V vinay_K

      Hi.. I need to draw a dotted Sine wave using GDI+ concept in Visual C#, please let me know which GDI+ Object i need to use.. replay asap

      S Offline
      S Offline
      Simon P Stevens
      wrote on last edited by
      #2

      you need to get a Graphics object. You can either respond to the paint event on the form and use e.Graphics, or you can create your own graphics object by calling CreateGrapics() on the control you want to draw onto.

      Simon

      V 1 Reply Last reply
      0
      • S Simon P Stevens

        you need to get a Graphics object. You can either respond to the paint event on the form and use e.Graphics, or you can create your own graphics object by calling CreateGrapics() on the control you want to draw onto.

        Simon

        V Offline
        V Offline
        vinay_K
        wrote on last edited by
        #3

        hi.. Simon I have created a graphics Object using this.CreateGraphics, now i need to know how to draw dotted Sine wave.. pls help me

        L 1 Reply Last reply
        0
        • V vinay_K

          hi.. Simon I have created a graphics Object using this.CreateGraphics, now i need to know how to draw dotted Sine wave.. pls help me

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          Graphics.DrawCurve() and give it some Point's.

          xacc.ide - now with TabsToSpaces support
          IronScheme - 1.0 beta 1 - out now!
          ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

          V 1 Reply Last reply
          0
          • L leppie

            Graphics.DrawCurve() and give it some Point's.

            xacc.ide - now with TabsToSpaces support
            IronScheme - 1.0 beta 1 - out now!
            ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

            V Offline
            V Offline
            vinay_K
            wrote on last edited by
            #5

            hi..leppie Good evening..:-) i dont want to draw continuous Sine wave, i just wanted to draw dotted sine wave, can u suggest me some related links..

            L 1 Reply Last reply
            0
            • V vinay_K

              hi..leppie Good evening..:-) i dont want to draw continuous Sine wave, i just wanted to draw dotted sine wave, can u suggest me some related links..

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #6

              skvs wrote:

              i dont want to draw continuous Sine wave, i just wanted to draw dotted sine wave, can u suggest me some related links..

              Then use a 'dotted' Pen. I dont know the exact property to set, but Pen (or Brush) have those options.

              xacc.ide - now with TabsToSpaces support
              IronScheme - 1.0 beta 1 - out now!
              ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

              V 1 Reply Last reply
              0
              • L leppie

                skvs wrote:

                i dont want to draw continuous Sine wave, i just wanted to draw dotted sine wave, can u suggest me some related links..

                Then use a 'dotted' Pen. I dont know the exact property to set, but Pen (or Brush) have those options.

                xacc.ide - now with TabsToSpaces support
                IronScheme - 1.0 beta 1 - out now!
                ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                V Offline
                V Offline
                vinay_K
                wrote on last edited by
                #7

                i already checked the properties of Pen and Brush, dotted pen is not there..

                L 1 Reply Last reply
                0
                • V vinay_K

                  i already checked the properties of Pen and Brush, dotted pen is not there..

                  L Offline
                  L Offline
                  leppie
                  wrote on last edited by
                  #8

                  skvs wrote:

                  i already checked the properties of Pen and Brush, dotted pen is not there..

                  You dont try very hard, do you? What do you think the DashStyle property do?

                  xacc.ide - now with TabsToSpaces support
                  IronScheme - 1.0 beta 1 - out now!
                  ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                  V 1 Reply Last reply
                  0
                  • L leppie

                    skvs wrote:

                    i already checked the properties of Pen and Brush, dotted pen is not there..

                    You dont try very hard, do you? What do you think the DashStyle property do?

                    xacc.ide - now with TabsToSpaces support
                    IronScheme - 1.0 beta 1 - out now!
                    ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                    V Offline
                    V Offline
                    vinay_K
                    wrote on last edited by
                    #9

                    no nothing like that, i didnt know where that option is...

                    Pen p = new pen(Color.Black).DashStyle

                    is still giving an error. pls leppie

                    L 1 Reply Last reply
                    0
                    • V vinay_K

                      no nothing like that, i didnt know where that option is...

                      Pen p = new pen(Color.Black).DashStyle

                      is still giving an error. pls leppie

                      L Offline
                      L Offline
                      leppie
                      wrote on last edited by
                      #10

                      skvs wrote:

                      is still giving an error.

                      The problem lies with your knowledge of C#. These things are normally discussed in the first few chapters of any C# book. You need to do:

                      Pen p = new Pen(Color.Back);
                      p.DashStyle = DashStyle.Dot;

                      xacc.ide - now with TabsToSpaces support
                      IronScheme - 1.0 beta 1 - out now!
                      ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                      V 1 Reply Last reply
                      0
                      • L leppie

                        skvs wrote:

                        is still giving an error.

                        The problem lies with your knowledge of C#. These things are normally discussed in the first few chapters of any C# book. You need to do:

                        Pen p = new Pen(Color.Back);
                        p.DashStyle = DashStyle.Dot;

                        xacc.ide - now with TabsToSpaces support
                        IronScheme - 1.0 beta 1 - out now!
                        ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                        V Offline
                        V Offline
                        vinay_K
                        wrote on last edited by
                        #11

                        thanks leppie. I have forgotten that, I'm New to C#. Sorry.. I ll try to Learn things as early as possible.. thanks :)

                        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