|
-
Sep 27th, 2002, 06:05 PM
#1
*RESOLVED* Autoredraw- Again!
I cant think of a way to do this without autoredraw!
I have a class that modifies the image inside a picturebox at an arbitrary time. Now how am I suppose to simulate an autoredraw for this?! the picture is modified inside a class, and as soon as the paint event of the picturebox is fired, everything is erased. (I'm using the graphics class to draw an image on the picturebox)
Also why is it that when you set the image property of a picturebox at design time, you wont loose your picture? why is it that .NET redraws the picture itself that way?
Last edited by MrPolite; Sep 27th, 2002 at 07:44 PM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Sep 27th, 2002, 06:43 PM
#2
I dont get it! when I create a new bitmap and I do the drawing on the bitmap and then set the picturebox.image to the bitmap, it will redraw the image inside automatically.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Sep 27th, 2002, 07:28 PM
#3
Hyperactive Member
You don't need auto-redraw!
Make an Image (or Bitmap, since it has more functionality) object, kinda like a back buffer. Do all of your drawing on that. Then, in the picture box Paint event, draw the bitmap object on it.
The Bitmap and Image objects wont lose their data.
-
Sep 27th, 2002, 07:44 PM
#4
Originally posted by Hu Flung Dung
You don't need auto-redraw!
Make an Image (or Bitmap, since it has more functionality) object, kinda like a back buffer. Do all of your drawing on that. Then, in the picture box Paint event, draw the bitmap object on it.
The Bitmap and Image objects wont lose their data.
umm, I said the drawing is done in a class, so I dont have access to the image that is created by the class that was my problemmo
anyways I ended up defining a new bitmap and making the new picture in the bitmap and then I set the picturebox.image to that bitmap...works fine without the need to redraw
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|