Results 1 to 9 of 9

Thread: Microsoft Paint-like application

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    198

    Microsoft Paint-like application

    Hi, does anyone have an example with vb.net or c#.net about how to use GDI+ for painting figures in real time, like Microsoft Paint?
    Thanks!.

  2. #2
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Microsoft Paint-like application

    Check this out. It might be a little more then you want, but it is a great example. The source code is at the bottom.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    198

    Re: Microsoft Paint-like application

    Wow!, i think that it's a bit more than a little more than i wanted! I really will need to study it, thank you very much.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    198

    Re: Microsoft Paint-like application

    Well, that code is really advanced to me. So i'll try to keep it simple. I'm working with a bitmap, and on mouse move, i use SetPixel method to paint a determined pixel. That works, but when i move mouse a bit faster, then the draw is like a dashed or dotted line, i mean that not every pixel that mouse is on while i'm moving it, is painted. If i move mouse faster, white spaces between pixels appears.
    This happens because MouseMove event is not raised always that mouse is moving, instead of that, MouseMove event is raised only a few times if mouse is moving fast.
    How can i solve it?

  5. #5
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: Microsoft Paint-like application

    mariona,

    take a look at my freehand drawing example at the codebank: http://www.vbforums.com/showthread.php?t=356433

    this demonstrates how to draw freehand with the mouse, the dotted issue is solved by drawing lines between the two points.

  6. #6
    New Member
    Join Date
    Apr 2024
    Posts
    1

    Re: Microsoft Paint-like application

    Quote Originally Posted by sevenhalo View Post
    Check this out. It might be a little more then you want, but it is a great example. The source code is at the bottom.

    Hi, this link is not working

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,155

    Re: Microsoft Paint-like application

    Yeah, and the thread is nearly 20 years old, so it's unlikely that even if it was working, the code would be. That would have had to have been .NET 2005, at best, which would mean targeting FW 2.0. While moving said code to something newer wouldn't be too hard, it is quite possible that it wouldn't work as such, because the framework may not be on any computer.
    My usual boring signature: Nothing

  8. #8
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,205

    Re: Microsoft Paint-like application

    Here is the archived copy of that page from the time that that post was made. No idea if the download links were archived as well.

    https://web.archive.org/web/20060110.../download.html

  9. #9

Posting Permissions

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



Click Here to Expand Forum to Full Width