GDI+ Graphics Dump

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mark.milley@binaryswitch.com

    #1

    GDI+ Graphics Dump

    Hi all -

    I'm a complete noob when it comes to using the system.drawing
    namespace.

    I'd like to draw a control to an image instead of on screen (the object
    shouldn't appear on screen at all). Any ideas?

    I was trying to use control.createG raphics, but it doesn't appear to
    have any options to save the data to a different surface...

    Is there any way to use the graphics object to draw to multiple
    surfaces simultaneously?

    Thanks,

    -Mark

  • Chris

    #2
    Re: GDI+ Graphics Dump

    mark.milley@bin aryswitch.com wrote:
    Hi all -
    >
    I'm a complete noob when it comes to using the system.drawing
    namespace.
    >
    I'd like to draw a control to an image instead of on screen (the object
    shouldn't appear on screen at all). Any ideas?
    >
    I was trying to use control.createG raphics, but it doesn't appear to
    have any options to save the data to a different surface...
    >
    Is there any way to use the graphics object to draw to multiple
    surfaces simultaneously?
    >
    Thanks,
    >
    -Mark
    >
    "I'd like to draw a control to an image instead of on screen"

    What does that mean?

    Comment

    • mark.milley@binaryswitch.com

      #3
      Re: GDI+ Graphics Dump


      "I'd like to draw a control to an image instead of on screen"
      >
      What does that mean?
      Instead of drawing it to the form surface (or simultaneously) , I'd like
      the control to paint itself onto a blank canvas in memory, so I can
      save that as an image.

      In this case, my end goal is to save a thumbnail of a web page *WITHOUT
      SHOWING IT ON SCREEN*. However, this same technique could be used to
      save a frame of a video, or anything else, for that matter.

      -M

      Comment

      • Chris

        #4
        Re: GDI+ Graphics Dump

        mark.milley@bin aryswitch.com wrote:
        >
        >"I'd like to draw a control to an image instead of on screen"
        >>
        >What does that mean?
        >
        Instead of drawing it to the form surface (or simultaneously) , I'd like
        the control to paint itself onto a blank canvas in memory, so I can
        save that as an image.
        >
        In this case, my end goal is to save a thumbnail of a web page *WITHOUT
        SHOWING IT ON SCREEN*. However, this same technique could be used to
        save a frame of a video, or anything else, for that matter.
        >
        -M
        >
        Ah, ok...

        Do a search on drawing to a bitmap.



        Chris

        Comment

        • mark.milley@binaryswitch.com

          #5
          Re: GDI+ Graphics Dump

          Do a search on drawing to a bitmap.

          No, I know how to draw to a bitmap. I'm trying to get (essentially) a
          screenshot of a control without that control ever appearing on screen.

          I can draw a bitmap.

          I can get a screenshot if it's on screen.

          What I can't do (yet) is have the control, without drawing itself to
          the screen, draw itself to an image instead--(or some other technique
          that would have the same result).

          I've tried putting the control on an offscreen form and trying to
          bitblt that, but it's not working.

          Comment

          Working...