By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

problem with image box

P: 9
Hi
when i tried to move an image box by a timer, it moved but with flashing
what can i do?
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: 11
More information would be helpful to assist you, the section of the code maybe?
All i can assume from what you have posted is that the image box is flashing as the timer ticks, this would be normal as it is redrawing itself... If you give me an idea of what you are trying to do, and or a code segment, i may be able to assist further..

Lee
Jun 28 '08 #2

P: 9
More information would be helpful to assist you, the section of the code maybe?
All i can assume from what you have posted is that the image box is flashing as the timer ticks, this would be normal as it is redrawing itself... If you give me an idea of what you are trying to do, and or a code segment, i may be able to assist further..

Lee

Thanks for your help
and this is the code i use to move the image

Private Sub Timer1_Timer()
image1.Left=image1.Left+50
End Sub

the property of interval of the timer is 100
Jul 3 '08 #3

P: 11
Hi, i have just written your code into a test app, an it doesnt appear to 'flash' in theory, i guess it could be your computer running slow? as the image will disappear, then re-appear in the new position...
Depending on what you are trying to do you could reduce the 'step' of moving (the imag1.left +50) to a smaller value an the timer tick, this may make the movement smoother and appear not to flash.. (just out of curiosity, may not have anything to do with it, do you have a CRT monitor? sometimes the refresh rate may cause this sort of thing to appear to flash..)

Sorry i cant give you a definite answer, but hope this helps!
Lee
Jul 4 '08 #4

debasisdas
Expert 5K+
P: 8,127
Please try to use Form_Paint() event , that might help.
Jul 4 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.