473,320 Members | 1,881 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,320 software developers and data experts.

Flashing Image

67
Hi all

I have a chechbox and if it is unchecked i want an image to flash on and off.
I know i have to use the OnTimer but not sure how to code the check box and image together through it. Can anyone please help.

Regards

Wayne
Nov 17 '08 #1
3 3961
ADezii
8,834 Expert 8TB
  1. Assume your Check Box is named chkImage and your Image Control is named imgTest.
  2. Place an Image into the Image Control.
  3. Set the Form's Timer Interval Interval to 1000 (1 second).
  4. Copy and Paste the following code into the Timer() Event (On Timer) Property of the Form:
  5. If the Check Box is checked, the Image will flash every second. Vary the Timer Interval (1000) should you desire more or less frequent flashing.
  6. Here is goes:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Timer()
    2. Static lngCounter As Long
    3.  
    4. lngCounter = lngCounter + 1
    5.  
    6. If Me![chkImage].Value Then
    7.   If lngCounter Mod 2 = 0 Then
    8.     Me![imgTest].Visible = True
    9.   Else
    10.     Me![imgTest].Visible = False
    11.   End If
    12. Else
    13.   Me![imgTest].Visible = False
    14.  
    15. If lngCounter = 2147000000 Then lngCounter = 1
    16. End If
    17. End Sub
Nov 17 '08 #2
Wayneyh
67
Thanks ADezii

That worked great. I had similar code, just wrong way round.

Thanks
Nov 17 '08 #3
ADezii
8,834 Expert 8TB
Thanks ADezii

That worked great. I had similar code, just wrong way round.

Thanks
You are quite welcome.
Nov 17 '08 #4

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

Similar topics

2
by: rikesh | last post by:
Hi Does anyone know how to make a table row flash in a certain colour, depending on a DB value? I have a helpdesk application listing statuses of Agents and the calls queued on the system. ...
2
by: Phillip Parr | last post by:
I've made a chat page using php and javascript. Which is nice. But I'd really like the title bar to flash when a new message appears for users who have minimised the window, like msn. Does any body...
9
by: Phillip Parr | last post by:
Hello, I know there is no way in Javascript to make the task bar flash when your window is minimised. However, I found out recently that if a javascript alert is sent to netscape when the window...
2
by: Xam | last post by:
Hello Everybody Can you let me know of a javascript/dom routine that will automatically put the flashing cursor in the first text box in my form so that it is ready for entry rather than the...
4
by: Randy Harris | last post by:
Strange problem on A2K. A continuous form is getting some sort of strobe effect on several systems that have been upgraded to Windows XP (never saw the problem on Win2K). One of the text boxes is...
0
by: Wayne | last post by:
If I open a report using this code it "flashes" as it opens: DoCmd.OpenReport "NumbersByDate", acViewPreview DoCmd.Maximize This is probably to be expected. If I open the same report using...
8
by: Ian Stiles | last post by:
If you have "Show window contents while dragging" turned on (Right-click desktop, Appearance, Effects) then you get horrible flashing and flickering on a CSharp form when the form hosts a...
2
by: DzemoT. | last post by:
how to make flashing label (or other text control) depending of label's text example: if label.text="Hello" then 'flash else 'dont flash end if tnx
0
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.