Closed GoogleCodeExporter closed 9 years ago
further info . . .
I have a work around. I converted all the colours to numbers and came up with
this
' set the foreground colour for the taglines and date/time
lblMonthTime.ForeGround = Choose(Settings["StartUp/LabelColour", "4"],
"0", "16711680", "65280", "16776960",
"255", "16711935", "65535", "16777215")
It isn't elegant but it works.
FYI --- My program grabs a different full form image with each startup.
Sometimes the image colours do not contrast enough with the label text so I
came up with a few colours to change.
Also, I have a duplicate of the code that doesn't work in another form in the
program and it works as expected.
I tried selecting all and pasting the code and controls onto another form but
it didn't work.
Hope this helps.
Original comment by t4769_a...@cogeco.ca
on 24 Dec 2012 at 12:48
Color constants are... constants. Not strings.
In other words, you must type Color.Black, not "Color.Black".
Original comment by benoit.m...@gmail.com
on 27 Dec 2012 at 6:30
Thank You for the reply.
One of the options I tried during my debugging was your suggestion. I tried the
option as an integer, string, and variant.
The attached file is a compressed project that shows that the .ForeGround
property will accept strings contrary to your statement. This is what has me
confused. Sometimes strings are accepted and sometimes (as your reply) not.
Sorry, but it works for me. I think (?)
May I suggest that this loophole be plugged.
Hope this helps.
Original comment by t4769_a...@cogeco.ca
on 27 Dec 2012 at 2:53
Attachments:
I have never said that the property won't accept strings.
Actually the property does *not* accept strings, *but* in that case the
language does automatic datatype conversion (note that it does automatic
datatype conversion almost everywhere).
Do not rely on automatic datatype conversion if you don't understand it, and
use normal constants as in any other programming language.
Original comment by benoit.m...@gmail.com
on 27 Dec 2012 at 3:15
Original issue reported on code.google.com by
t4769_a...@cogeco.ca
on 23 Dec 2012 at 9:41