|
-
Jun 20th, 2002, 01:11 AM
#1
Thread Starter
New Member
Graphics
I'm making a program that has quit a bit of graphics in it. Whenever I switch pictures or move them they flicker. Seems like a redraw problem. Does anyone know what I can do to help this?
Thanks.
-
Jun 20th, 2002, 01:13 AM
#2
Whenever you do these, try putting in
in there.
-
Jun 20th, 2002, 01:26 AM
#3
New Member
i have not tried much in vb but in qbasic we just drew the pictures in a different screen and did pcopy() to copy that page to the visible one..
some one yell at me know lol
-
Jun 20th, 2002, 01:30 AM
#4
*clears throat*
THERE'S NO PCOPY IN VB!!!
-
Jun 20th, 2002, 02:20 AM
#5
Thread Starter
New Member
I just put doevents at the top of the procedure right? If so, it doesn't really work. what does Doevents do? I forgot. I thought it had something to do with threads. Well thanks anyway.
-
Jun 20th, 2002, 02:24 AM
#6
More or less, yeah.
While your app is running, it's taking up most of the CPU time. Now when u switch pics or reposition, the form must be redrawn. That's where the DoEvents comes in, telling the CPU to finish up on (other) work which includes redrawing the form.
Put DoEvents in between your code, for example when u move your pic, etc.
-
Jun 20th, 2002, 03:15 AM
#7
Hyperactive Member
Check the Api LockWindowUpdate.
-
Jun 20th, 2002, 05:06 AM
#8
Thread Starter
New Member
To Xa0z:
From what I found all LockWindowUpdate does is enable or disable drawing in a window. But I was looking at the redrawWindow API that looks like it might be helpful. Any thoughts on that API call?
To mendhak:
Private Sub Timer1_Timer()
DoEvents
image1.Left = image1.Left + 100
End Sub
Is that what you mean?
(How'd you get your code sectioned off?)
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
|