View Full Version : fun challenge: label text flashes colours
OTWarrior
11-27-2007, 02:30 AM
I would put this in misc but it is also access related.
I am working on a form for displaying a Christmas message to the team, and I want the text which says "Merry Christmas" to flash colours (just for fun ;)
I would like it to change colours, by individually changing each letter.
how would you you get each letter to be a different colour
mattj
11-27-2007, 06:43 AM
I've never used it, bu tI think the only way you can do this is with a rich text control (http://www.lebans.com/richtext.htm).
Another method would be individual controls for each label.
HTH
Matt
X-BRichard-X
12-15-2007, 10:14 AM
There are two ways in which animation can be displayed in MS Access. One way is to use an OCX control that supports animated GIFs. For $45 you can purchase a license to use an Animation GIF Active X control at:
www (dot) jcomsoft (dot) com (slash) anigif (dot) htm
(Apparently I can't post a damn link until after I've posted at least (5) times....stupid ass rule...)
Another less expensive but albeit limited way in which animation can be created in an MS Access form is to use the following code:
'Place this code in the ON CURRENT event procedure of the FORM
PrivateSub Form_Current()
Me.TimerInterval = 250
EndSub
------------------------------------
'Place this code in the ON TIMER event procedure of the FORM
'Content of the label will alternate between BLACK and RED in this example - colors can be modified
PrivateSub Form_Timer()
WithMe.Labelblink
.ForeColor = (IIf(.ForeColor = vbBlack, vbRed, vbBlack))
EndWith
EndSub
'NOTE1: A WITH statement MUST be used for the blinking effect to work properly.
While this solution does not answer the question of how to make EACH letter in a message blink, with some creativity and testing, this solution could be used to achieve that result.
Another way in which animation can be deployed in an MS Access form is by using agent files (.acs) that are typically used for animating the help in an entertaining way for an application that functions much like "Clippy" does.
That is a whole other topic and code for discussion in another thread. Nonetheless, it's very possible to achieve it and it's not very difficult to do.
DarkSprout
12-17-2007, 06:05 AM
See Attached zip file,
Is this the sort of thing you were looking for?
Enjoy,
=DarkSprout=
OTWarrior
12-18-2007, 10:13 AM
Thats not what i am after unfortunately. However that is a very neat bit of coding, and the form looks good :)
As with your example, I can do it with labels and an array, but I would like to know HOW to manipulate a string to change the font colour value. Or is such a thing not possible as the whole label has to be one colour?
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.