Results 1 to 2 of 2

Thread: slow-moving loop

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    slow-moving loop

    Hey all.
    I have a really slow-moving loop here. not sure why

    72 small pics on the screen with background images behind them.

    I made them invisible to swap the images, then re-visible

    For t = 1 To 72
    picBackground(t).Visible = False
    imgForeground(t).Visible = False
    Next

    'change out pics
    For t = 1 To 72
    picBackground(t).Visible = True
    imgForeground(t).Visible = True
    Next

    I made them all invisible and revisible to avoid the "sweep" effect as the pics change, but they are going invisible one by one, not instantly.
    I have a top-notch CPU/MOBO/RAM/Video Card, so I don't think that's it
    I thought the pics might be too large,and since some were pretty large, I thumbnailed all the pics so that they are now all around 3kb JPG
    No difference
    I'm wondering if it is going past the Next and trying to start loading the new images

    Any thoughts?
    Also, I remember in VB6 it was easy to lock the screen while making big changes and then unlock it, and that avoided the sweep effect.
    Haven't seen it in .Net

    Thanks all
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: slow-moving loop

    You could just put all the controls on a Panel and then you only have to set the Visible property of one control.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width