Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to avoid flicker when changing pictures in image con
Message
From
12/07/2010 23:09:21
 
 
To
09/07/2010 19:38:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01472113
Message ID:
01472302
Views:
155
This message has been marked as the solution to the initial question of the thread.
>Hi Experts,
>
>I have a form in a timekeeping app which shows the time.
>
>In it, I have a timer with an interval of 1000 (1 second), which gets the current time using TIME(), then shows the corresponding image file (PNG) that represents each digit.
>
>Everything is fine though except for the "flickering" of the screen each time the timer fires.
>
>Below is my code in the Timer event:
>
>
>
>* code here assigns the image filenames to the vars
>* 
>WITH ThisForm
>
>   .LockScreen = .T.
>   .imgHour1.Picture = lcHour1File
>   .imgHour2.Picture = lcHour2File
>   .imgMin1.Picture = lcMin1File
>   .imgMin2.Picture = lcMin2File
>   .imgSec1.Picture = lcSec1File
>   .imgSec2.Picture = lcSec2File
>   .LockScreen = .F.
>
>ENDWITH
>
>
>
>How do I stop the "flickering"?
>
>Thanks in advance.
>
>Dennis

Dennis

It is known that using a PNG with VFP will cause flickering. Use a PNG only if you also want transparency.

In all other cases use a BMP format image. You can easily convert your PNG to BMP. Also if you want the surrounding (background of the image) to be transparent, then colour the background White - RGB(255,255,255) and set image.BackStyle = Transparent.

But the fix is to NOT use PNG but use BMP.

PNG = Flicker
BMP = No Flicker

HTH

Bernard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform