Solved

want to show 3 pictures in frame each for certain time

Posted on 1998-09-01
5
194 Views
Last Modified: 2010-04-30
want to be able to show each of 3 (0r more) pictures in a frame for variable time length then go back to beginning and start over. Need to have the routine stop if any key or mouse movement is detected. Please use timer in example and be specific as to what code is put in what area.
0
Comment
Question by:rfb
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:percosolator
ID: 1432424
Try using the picture clip control.  It will let you insert multiple images and iterate through them.  Moderately simple to use, too.

I've seen it used for animation sequences...
0
 
LVL 1

Author Comment

by:rfb
ID: 1432425
my question requests the use of the timer control.
0
 
LVL 2

Expert Comment

by:percosolator
ID: 1432426
In conjunction with the timer control.....

Like this sample code
--------------------------


Private Sub Timer1_Timer()
    Static i As Integer

    i = i + 1
    If i = 16 Then
        i = 0
    End If
    imgLens.Picture = PictureClip1.GraphicCell(i)
End Sub
0
 
LVL 1

Author Comment

by:rfb
ID: 1432427
my question requests the use of the timer control.
0
 
LVL 2

Accepted Solution

by:
percosolator earned 100 total points
ID: 1432428
What do you think the Timer1_Timer Event is used by?

This code is used to simulate the magnifying glass circling for "Find Files" in one of our programs....

We used the timer (Timer1) and an image control (imgLens) and the picture clip control with an array of 16 images (like cells in a movie) to be animated (PictureClip1)...

The code I posted is all that is needed (once you have your controls created and their properties set), for the animation effect that I believe you are talking about.

If this doesn't answer your question, please elucidate as to what effect exactly you are trying to achieve.
-------
Private Sub Timer1_Timer()
    Static i As Integer

    i = i + 1
    If i = 16 Then
        i = 0
    End If
    imgLens.Picture = PictureClip1.GraphicCell(i)
End Sub
-------------------------
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question