Results 1 to 5 of 5

Thread: [CF.NET C#] Ink Drawing?

  1. #1

    [CF.NET C#] Ink Drawing?

    I'm quite enjoying developing for my PDA at the moment but it seems a shame to have a touch screen and not use it for drawing.
    Does CF have a component similar to the WPF InkCanvas? Would be interesting
    Thnx
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  2. #2
    You still have paint() event you can use to draw with. I once made a small image editor with it so it can't be too complicated to make a more advanced drawing type tool.

    Join #kirupa | Click the under my Username | CL | Jeff

  3. #3
    I understand that you can draw circles, lines etc with the Graphics class but can you draw straight onto a panel with the stylus? As in I drag the stylus across the panel and a line appears?
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  4. #4
    Yes, you have stylus input that you can use. Its just like windows form. If stylus is down while move(like mouse move) then you draw on the bitmap or graphic).

    The stylus (mouse) events are probably different its been a while sense I developed for it. Draw the bitmap and then draw that to the form.

    Join #kirupa | Click the under my Username | CL | Jeff

  5. #5
    Okay Im having some trouble with this code:
    Code:
    private int? X, Y;
            private void Draw(object sender, MouseEventArgs e)
            {
                this.X = e.X;
                this.Y = e.Y;
                this.PaintPanel.Invalidate();
               // MessageBox.Show("Mouse Move called, points (x, y) " + this.X.ToString() + this.Y.ToString());
            }
            private void DrawPixel(int x, int y, ref Graphics G)
            {
                G.FillRectangle(new SolidBrush(Color.Black), x, y, 1, 1);        
            }
    
            private void PaintPanel_Paint(object sender, PaintEventArgs e)
            {
                MessageBox.Show("Paint called, hurrah");
                Graphics G = e.Graphics;
                if(this.X != null && this.Y != null)
                    this.DrawPixel((int)this.X, (int)this.Y, ref G);
                G.DrawEllipse(new Pen(Color.Orange), 2, 2, 10, 10);
            }
    The events get called correctly but nothing is drawn.. help? thnx
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012