What is the graphics object


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: What is the graphics object

  1. #1
    Michael Culley Guest

    What is the graphics object

    I've been using the graphics object to paint an entire usercontrol. I've
    come across a few questions that I cannot find the answer to in books. First
    of all, in terms of APIs, what is the graphics object, is it a device
    context? Why do I have to use Me.CreateGraphics all the time? I guess what
    I'm after is some general info regarding what is happening under the hood
    when I use the Graphics objects.

    Cheers

    --
    Michael Culley
    www.vbdotcom.com





  2. #2
    Zane Thomas Guest

    Re: What is the graphics object

    Michael,

    >I've been using the graphics object to paint an entire usercontrol. I've
    >come across a few questions that I cannot find the answer to in books. First
    >of all, in terms of APIs, what is the graphics object, is it a device
    >context?


    It's not correct to say it *is* a device context, but you're close. The
    Graphics class encapsulates a device context and methods you invoke on a
    graphics object have an effect on that device context.

    >Why do I have to use Me.CreateGraphics all the time?


    That's roughly equivalent, conceptually, to GetDC in old-school windows
    programming.


    --
    Turn on, tune in, download.
    zane@mvps.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center