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

value of type "Integer" cannot be ...............

P: n/a
value of type "Integer" cannot be convert to system.color.
in procedure events:
Function doColor(ByVal rtb As RichTextBox, ByVal a As String)
Dim bColor, fColor, fgcolor, bgcolor As Integer
..
..
..
fColor=Colour(fgcolor) ===> error occured in fgcolour
..
..
..
end Function

i tried many ways such as directcast, ctype. i can only do in vb6 but
not in vb.net
what i 'm attempting is similar to mirc chat. but working on background
colour with no third party. :-)
regards,
supra

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* Supra <su*****@rogers.com> scripsit:
value of* type "Integer" cannot be convert to* system.color.
*in procedure events:
Function doColor(ByVal rtb As RichTextBox, ByVal a As String)
******* Dim bColor, fColor, fgcolor, bgcolor As Integer
.
.
.
fColor=Colour(fgcolor)* ** ===> error occured in fgcolour
.
.
.
end Function
i tried many ways such as directcast, ctype. i can only do in vb6 but not in vb.net
what i 'm attempting is similar to mirc chat. but working on background colour with no third party. :-)


Take a look at the 'ColorTranslator' class and 'Color.FromArgb'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

P: n/a
thank.

Herfried K. Wagner [MVP] wrote:
* Supra <su*****@rogers.com> scripsit:

value of type "Integer" cannot be convert to system.color.
in procedure events:
Function doColor(ByVal rtb As RichTextBox, ByVal a As String)
Dim bColor, fColor, fgcolor, bgcolor As Integer
.
.
.
fColor=Colour(fgcolor) ===> error occured in fgcolour
.
.
.
end Function
i tried many ways such as directcast, ctype. i can only do in vb6 but not in vb.net
what i 'm attempting is similar to mirc chat. but working on background colour with no third party. :-)


Take a look at the 'ColorTranslator' class and 'Color.FromArgb'.


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.