C# 2008 Simpe graphics render question - RealWorld forums
C# 2008 Simpe graphics render question - RealWorld forums
RealWorld Graphics logo    
Log-in or register.   
IndexSoftwareGalleryTutorialsForumsUsers

Software support
Graphic design
Using graphics
Non-English
General chat
Links
Is the speed of this web adequate?

I wish there were ...

Select background

Forum index » Using graphics » C# 2008 Simpe graphics render question
progmgp
on September 9th 2009

I have a class that holds a bitmap. At any given time I set a form's background image to the class bitmap. I'm watching for mouse_up events and checking mouse positions. If the user chooses a particular region in the form, I want to draw a rectangle around a specified area. If the user moves the mouse with the region selected, I want to redraw just the rectangle so as to represent where the image is to be redrawn. When the user releases the mouse after a move, I redraw the class image and reset the forms background image to the class bitmap. My problem is when I'm drawing the rectangle during a move, the rectangle barely gets drawn then disappears. I have the form's double_buffer set on. If I turn double_buffer off, the rectangles show up better but the background flickers badly. How would every one suggest I handle the drawing so as to smoothly display my selection rectagles during a mouse move? The selection rectangles are drawn in the forms paint event. The Background is changed in a called method. I'm using c# 2008. Thanks for your thoughts!!

Page views: 100       Posts: 1      
You cannot reply to this topic.

Copyright © 2005-2009 RealWorld Graphics. Contact: info@rw-designer.com.