problem with image box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vbbeginner
    New Member
    • Jan 2008
    • 9

    problem with image box

    Hi
    when i tried to move an image box by a timer, it moved but with flashing
    what can i do?
  • leeogrady
    New Member
    • Jun 2008
    • 11

    #2
    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

    Comment

    • vbbeginner
      New Member
      • Jan 2008
      • 9

      #3
      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=ima ge1.Left+50
      End Sub

      the property of interval of the timer is 100

      Comment

      • leeogrady
        New Member
        • Jun 2008
        • 11

        #4
        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

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Please try to use Form_Paint() event , that might help.

          Comment

          Working...