By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

A2K - possible to have fading colour effect on labels or textboxes?

P: n/a
Don't know if any of you chaps use www.basecamphq.com (a smart project
management tool) but when you post a message up the entire post is
highlighted in yellow, then fades until its disappears and you are left with
the normal black text on a white background.

It really is rather smart and I was wondering if something like that was
possible in Access. Probably not but it would be nice.

I've taken the liberty of posting up a very small video file at

http://www.gigashare.com/files/embed...h%20effect.avi

It's only 316k. And the quality isn't very good but you can just about see
what happens after the post is made the colour change comes into effect.

thanks
Martin
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sun, 17 Jul 2005 18:21:22 +0100, "Deano" <de***@mailinator.com> wrote:
Don't know if any of you chaps use www.basecamphq.com (a smart project
management tool) but when you post a message up the entire post is
highlighted in yellow, then fades until its disappears and you are left with
the normal black text on a white background.

It really is rather smart and I was wondering if something like that was
possible in Access. Probably not but it would be nice.

I've taken the liberty of posting up a very small video file at

http://www.gigashare.com/files/embed...h%20effect.avi

It's only 316k. And the quality isn't very good but you can just about see
what happens after the post is made the colour change comes into effect.

thanks
Martin

you could use a timer with a form containing code similar to that below

Option Compare Database
Option Explicit

Dim myred&
Dim mygreen&
Dim myblue&

Private Function fadecolour() As Long
myred = addone(myred)
mygreen = addone(mygreen)
myblue = addone(myblue)
fadecolour = RGB(myred, mygreen, myblue)
End Function

Private Sub setcolour(ByVal r&, ByVal g&, ByVal b&)
myred = r
mygreen = g
myblue = b
End Sub

Private Function addone(ByVal x&)
If x >= 255 Then
addone = 255
Else
addone = x + 1
End If
End Function

Private Sub Form_Timer()
Dim x&, y&
x = Text0.BackColor
y = fadecolour()
If x = y Then
Form.TimerInterval = 0
Else
Text0.BackColor = y
End If
End Sub

Private Sub Text0_AfterUpdate()
Text0.BackColor = RGB(255, 255, 0)
setcolour 255, 255, 0
Form.TimerInterval = 10
End Sub
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.