|
-
Aug 1st, 2002, 12:43 AM
#1
Thread Starter
Junior Member
Moving image
I'm haveing a slight problem with bitblt. I have a form and a picturebox. The form is to be drawn upon and the picturebox is just for temporary storage. I put a Timer on the form and set it every second to update and copy the content of the form into the picturebox then put it back on the form to the left of one pixel. Like a moving chart. Like the task manager CPU chart. See what i'm saying? Hope I explained good enough. Thank you.
The best poster in the world is a window.
-
Aug 1st, 2002, 12:43 PM
#2
Frenzied Member
So uh....whats your question?
-
Aug 2nd, 2002, 08:16 PM
#3
Fanatic Member
Instead of bitblt u could use getpixel, setpixel. Make sure u call them in the variable section. Then do this:
Dim Color as Long
Dim X as Long
Dim Y as Long
For X = 0 to Form1.scalewidth
For Y = 0 to Form1.scaleheight
Color = GetPixel(form1.hdc,x,y)
setpixel picture1.hdc ,X ,Y ,Color
Next Y
Next X
For X = 0 to picture1.scalewidth
For Y = 0 to picture1.scaleheight
Color = GetPixel(picture1.hdc,x,y)
setpixel form1.hdc ,X-1 ,Y-1 ,Color
Next Y
Next X
form1 = the forms name
picture1 = the picturebox's name
that should do the trick
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
|