Jump to content
SubSpace Forum Network

Recommended Posts

Posted

I'm trying to figure out how to draw stuff kind of like I would with the BitBlt API. However, I want to use native C# functions in System.Drawing.

 

I'm not sure at all how all that works... I have Bitmap objects, I want to copy parts of them somewhere on a picturebox (or whatever would work). So far I've only been able to draw something, but it would get erased as soon as the control is redrawn (i.e. minimize window / restore).

In VB6, I would use a picturebox with 'auto-redraw' set to OFF, then BitBlt bitmap data on the picturebox's hDC, and it would stay there. Has anyone done something similar in C# (or VB.net or Java would be close enough, I guess)?

Posted
In the limited work I've done with graphics, the entire screen was redrawn every time. Granted I wasn't using GDI, but I wouldn't be surprised if it behaved in a similar manner. It's possible that your "permanent" drawing just does this behind the scenes.
Posted
In VB6, I would use a picturebox with 'auto-redraw' set to OFF

 

you mean autoredraw = true

yeah, probably... I just remember we had to change it blum.gif Actually that makes sense... it means whatever you put in it will be repainted everytime...

 

ok then, I'll have to draw on a bitmap, and paint the bitmap on every Paint event.

 

Thanks for these links doc, my searches on google weren't as successful :(

Guest
This topic is now closed to further replies.
×
×
  • Create New...