DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links