I have a Windows Form Application in Visual Studio 2008 - PictureBox.Refesh() method causes a delay when drawing on a PictureBox. Is there any method that gives the same result without delay?
A:
Without delay? Invalidate() works too, but remember... don't use refresh() on the whole form, specify it... Maybe that's causing the delay (I don't see delays like that, are you reading the image from where?)
EDIT: I was building a project and PNG's 8-bit alpha blending was not playing nice with winforms. Open my app and see if you have that flickering when you resize:
http://www.mediafire.com/?rnj25my2ygd
Camilo Martin
2009-12-18 05:47:14
i am making a bmpimage by the file data and then putting it in picture box and then want to make a rectangle selection of particular region of drawing to show that selection i need a refres of screen.
moon
2009-12-18 06:09:58
invalidate() is not working on it buddy!
moon
2009-12-18 06:11:38
can you help me any more?
moon
2009-12-18 06:12:11
Hum... is the file being reloaded? =/ What kind of delay are you getting? the re-drawing is so fast that it's drawn as you resize it, so it's really fast. I believe there is a bottleneck somewhere else. What about putting the image in an imagelist and assigning it to the picturebox?
Camilo Martin
2009-12-18 06:51:28
Also, are you using 1 bit of alpha transparency, or more? Since .NET WinForms is very slow on alpha transparency compared to a browser.
Camilo Martin
2009-12-18 06:53:46
A:
i have solved my problem my self
i just set a timer and on its event i have updated my image and the timer interval is set as i desired to 100 miliseconds now my application is running so smoothly any one up with this problem try this it works for me
regards:
moon
2009-12-22 07:56:48
Good for you because I still don't understand what the question was =/
Camilo Martin
2009-12-22 12:04:17