473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to make images appear in intervals of seconds

Hi all

I'm trying to let images appear after a fixed amount of seconds. So 3 second wait, image 1 appears, 3 second wait, image 2 appears, 3 second wait and image 3 appears.

I've tried something but the problem is that all three images appear at the same time (dunno why) after 9 seconds.

I want them to keep appearing one by one until the user answers a question correctly.

in module:
Expand|Select|Wrap|Line Numbers
  1. Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
in program:
Expand|Select|Wrap|Line Numbers
  1.     intSeconden = 3
  2.     Call Sleep(intSeconden)
  3.     imgHoofd.Visible = True
  4.     Call Sleep(intSeconden)
  5.     imgMidden.Visible = True
  6.     Call Sleep(intSeconden)
  7.     Imgvoet.Visible = True
Jul 30 '10 #1
4 2912
ADezii
8,834 Expert 8TB
@Will The Gray
Just subscribing, will return.
Jul 30 '10 #2
ADezii
8,834 Expert 8TB
I've created a Demo for you that will do exactly what you have requested by using the Form's Timer() Event, Timer Interval Property, dynamically Load Images into three Image Controls, alternately display the three Images and recycle them every three seconds, and allow a mechanism to shut down this Image Display Process. Simply download the Attachment and Unzip the four Files contained within to the 'same' Folder. It makes no difference whatsoever where that Folder is, but the Database File (Image Appear.mdb) and the three Image Files (1.bmp, 3.bmp, and 6.bmp) must exist in the same Folder . Any questions, feel free to ask.
Attached Files
File Type: zip Image Appear.zip (26.1 KB, 234 views)
Jul 30 '10 #3
Thanks a million! Your example is exactly what I was looking for. I modified it a bit to start the timer when a button is clicked.

There's still one more thing I need though. The timer needs to be reset to 0 after an event (when the user answers a question correctly), the first image is displayed again and the counter should start counting from 0 again.
Jul 31 '10 #4
ADezii
8,834 Expert 8TB
@Will The Gray
If I am reading you correctly, then:
  1. Disable the Timer
  2. Set the first Image to Visible, and the other two to Not Visible
  3. Reset the Timer to 3 seconds
    Expand|Select|Wrap|Line Numbers
    1. Me.TimerInterval = 0        'Disable Timer
    2.  
    3. 'Reset all the Images
    4. Me![imgHoofd].Visible = True
    5. Me![imgMidden].Visible = False
    6. Me![imgVoet].Visible = False
    7.  
    8. Me.TimerInterval = 3000     '3 Seconds
Jul 31 '10 #5

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

Similar topics

6
by: | last post by:
Hello all, This is an IE6 question: When I click on an image file on my desktop, ie will automatically resize the image to fit the window. But, when I use html to load the image, i.e. <img...
2
by: chanmmn | last post by:
How to make dll appear in .Net tag when Add References? Please help chanmm
2
by: windsorben | last post by:
I'd like to have an image appear after the student answers each short answer question correctly. I can't seem to get it to work properly. See code below. Thanks! <html> <head>...
5
by: royend | last post by:
Is it possible to hide images from the internet, and only have a image available for users that are logged into the intranet? I am hoping to avoid a database-solution as the number of images will...
2
by: alizabeth33 | last post by:
I want to make an image pop up when my text is clicked and I can not figure out how to do that. Instead of having a new page come up, I want just the image to pop up and I know you can do it through...
1
by: newkhan | last post by:
Hi All, I am creating a web page in asp.net with c#.net. There are two image boxes in the page one is filled with image and the other is blank. My task is to make that when the mouse cursor...
5
by: ryanmhuc | last post by:
Is it possible to make the scrollbar appear on a page which is NOT A POPUP? On IE the scollbar space is always reserved or appears even if not used. In Firefox it does not exist unless the...
10
by: moondaddy | last post by:
Hi, I have 3 tiny content controls and each has a Path in it to draw some lines. These need to be very small and I'm having trouble making the lines clear. the lines have a stroke thickness of "1",...
8
Jerry Maiapu
by: Jerry Maiapu | last post by:
Hi everyone, I have just created a form and made it to stay on top of non-Microsoft Access forms and windows using examples modules here: http://support.microsoft.com/kb/210500. Which works fine. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.