Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Saving a Control's Graphic Content to a Bitmap

Saving a Control's Graphic Content to a Bitmap

Scheduled Pinned Locked Moved C#
graphicstutorialcssquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sebaaaa
    wrote on last edited by
    #1

    I'm trying to make a control paint itself to a bitmap and save it. I'm trying to do this by making the control paint itself to my graphics object and not by screen capturing and coping. I have had a success with button and label for example. I override the class (ex. button) and made a SaveGraphics method which initialized a bitmap and called the OnPaint method with the bitmap's graphics object. I've had less success with a TextBox or UserControl. In a UserControl, I can call each control with InvokePaint but that still does not work for a TextBox. In overriding a TextBox, calling OnPaint method does not render the text. Anyone have an idea on how to save a TextBox's graphics content to a Bitmap? -- modified at 4:13 Friday 10th March, 2006

    S 1 Reply Last reply
    0
    • S sebaaaa

      I'm trying to make a control paint itself to a bitmap and save it. I'm trying to do this by making the control paint itself to my graphics object and not by screen capturing and coping. I have had a success with button and label for example. I override the class (ex. button) and made a SaveGraphics method which initialized a bitmap and called the OnPaint method with the bitmap's graphics object. I've had less success with a TextBox or UserControl. In a UserControl, I can call each control with InvokePaint but that still does not work for a TextBox. In overriding a TextBox, calling OnPaint method does not render the text. Anyone have an idea on how to save a TextBox's graphics content to a Bitmap? -- modified at 4:13 Friday 10th March, 2006

      S Offline
      S Offline
      sebaaaa
      wrote on last edited by
      #2

      Question asked, Answer given... I looked a bit and found those here: http://www.codeproject.com/cs/miscctrl/alphablendtextbox.asp http://www.thecodeproject.com/cs/miscctrl/AlphaBlendedTextControls.asp If I'l succeed I will post another answer.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups