|
-
Feb 21st, 2002, 06:50 PM
#1
Thread Starter
Member
animations
whenever i animate an image it always flickers, is there a way to fix that?
-
Feb 21st, 2002, 09:37 PM
#2
Good Ol' Platypus
Yea. Draw everything to an INVISIBLE picturebox (with AutoRedraw on), and then blit the entire picturebox (no CLS statement) onto a visible picturebox. Voila, no mess! Make sure to CLS the invisible picturebox, however.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 26th, 2002, 05:44 AM
#3
Member
Cool !!!
That's the info I always waited for !!!
Anyway: I'm in trouble !
The only thing I get when I try to copy a red line from one picturebox to another picturebox ( on the same form ) is a black square....
Here's my code:
Dim retval As Long
Picture1.Line (0, 0)-(200, 300), RGB(255, 0, 0)
retval = BitBlt(Form1.Picture2.hDC, 0, 0, 2772, 2772, Form1.Picture1.hDC, 0, 0, SCRCOPY)
What am I doing wrong ???????????????????
Any help woul be appreciated !
Thanks !
Tom
-
Feb 26th, 2002, 08:18 AM
#4
Good Ol' Platypus
Well you call Picture1.Line but then you call Form1.Picture1.hDC to get it's hDC... my suggestion to you is put Form1.Picture1.Line instead of just Picture1.Line.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 26th, 2002, 08:30 AM
#5
Member
Thanks for your help Sastraxi !
I did as you told me, but there's no difference...
Other idea ?!? ;-)
Tom
-
Feb 26th, 2002, 03:00 PM
#6
Addicted Member
Create a visible PictureBox with AutoRedraw set to true. CLS it and draw to it, and then to show changed contents to the screen, call .Refresh. When a picturebox is AutoRedraw, it stores its image offscreen, and only updates it when you call .Refresh, preventing flicker.
"1 4m 4 1337 #4xz0r!'
Janus
-
Feb 28th, 2002, 03:24 AM
#7
Member
Ok, it works now !
I always forgot to initialize the value for SCRCOPY...
... how stupid !!
Thanks guys !!!
-
Feb 28th, 2002, 07:50 AM
#8
New Member
why U got a picture of michael shuemacker mafia geek?????
-
Feb 28th, 2002, 01:42 PM
#9
Addicted Member
Sastraxi
Co-Captain of Team Canada
CANADIANS UNITE! Join Team Canada in Kovan's "Compete Against the World"! We will crush opposition!
hey Sastraxi, can i join even though i'm not canadian? what
are you competing for? and who is Kovan?
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
|