Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics

Post new topic   Reply to topic
pictures flash when i move them
View previous topic :: View next topic  
Author Message
Dicko
Newbie


Joined: 13 Jan 2004
Posts: 2

PostPosted: Jan 13th, 2004 08:12 PM    Post subject: pictures flash when i move them Reply with quote


Ok, i cant seem to be able to stop my pictures from flashing when i move them

if keycode = vbkeyleft then
image1.top = image1.top + 50
end if

^ my example code format

how do i stop this from happening?

_________________
*beep*
Back to top
View user's profile Send private message Send e-mail
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Jan 20th, 2004 03:57 AM    Post subject: Reply with quote

the flashing is a limitation of the image control. you can try smaller pictures, but if your trying to do smooth graphics you'll need to look into BitBLT (http://www.mentalis.org/apilist/BitBlt.shtml) or something along those lines. It's not my forte, or I'd drop you some pointers, sorry.
_________________
If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too.
Back to top
View user's profile Send private message
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Jan 21st, 2004 09:16 AM    Post subject: Reply with quote

You can work around this with the [api]LockWindowUpdate[/api] API Wink

Code:
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long


Works as following :

Code:
If KeyCode = vbKeyLeft Then
LockWindowUpdate Me.hWnd
Image1.Top = Image1.Top + 50
LockWindowUpdate 0&
End If

_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic