This issue you are running into is that the LfColor.FromRgb() takes either 3 integer inputs (R,G,B) or it takes a single integer input (hex value of RGB converted to integer). Your code is providing a String object. The program is then trying to convert the string to an integer. Since your string of "225,225,128" can be converted to and integer of 225225128, that is what you are passing. If your input string had been "225, 225, 128", then the code would have thrown an error since this cannot be converted to an integer. If you want to pass the color as a single string with 3 integers divided by comma, then you need to split the string into the 3 sperate parts. Try something like this
Dim sRGB() As String = FileOperations.Anno.FillColor.Split(",")
Dim iR, iG, iB As Integer
If Integer.TryParse(sRGB(0), iR) Then
If Integer.TryParse(sRGB(1), iG) Then
If Integer.TryParse(sRGB(2), iB) Then
Anno.FillColor = Laserfiche.RepositoryAccess.Common.LfColor.FromRgb(iR, iG, iB)
End If
End If
End If
Otherwise, you can convert your 3 RGB integers to a single integer by something like this
Private Function RGBtoInteger(ByVal iR As Integer, ByVal iG As Integer, ByVal iB As Integer) As Integer
Dim iReturn As Integer
Try
Dim hexR As String = Hex(iR)
Dim hexG As String = Hex(iG)
Dim hexB As String = Hex(iB)
iReturn = CInt("&H" & hexR & hexG & hexB)
Catch ex As Exception
End Try
Return iReturn
End Function