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

  • Thread starter Thread starter Supra
  • Start date Start date
S

Supra

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
 
* Supra said:
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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top