How to draw a point in GDI+

Posted on 2004-11-05
Last Modified: 2008-02-01
Is there a technique to draw a single point in GDI+, or do I have to create an image and draw that?
Question by:natejacobs
    1 Comment
    LVL 1

    Accepted Solution

    I don't believe there is a way to directly create a single point in GDI+.  I was trying to do the same thing recently, but the only way I found to do it was to create a bitmap, and use setpixel to place the pixel where I wanted it.  It may be possible to accomplish this with The DrawRectangle method.  Seems to me, depending on the pen, a rectangle with a width and height of 1 would be a single pixel, although I didn't think to try that when I was working on the similar problem.  In my case the bitmap with setpixel was sufficient.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now