2013-11-10
展开全部
Private Structure RGB
Dim Red As Integer
Dim Green As Integer
Dim Blue As Integer
End Structure
Private Function FindRgb(ByVal StrColor_Hex As String) As RGB
With FindRgb
.Red = System.Int16.Parse(StrColor_Hex.Substring(1, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
.Green = System.Int16.Parse(StrColor_Hex.Substring(3, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
.Blue = System.Int16.Parse(StrColor_Hex.Substring(5, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
End With
Return FindRgb
End Function
Dim Red As Integer
Dim Green As Integer
Dim Blue As Integer
End Structure
Private Function FindRgb(ByVal StrColor_Hex As String) As RGB
With FindRgb
.Red = System.Int16.Parse(StrColor_Hex.Substring(1, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
.Green = System.Int16.Parse(StrColor_Hex.Substring(3, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
.Blue = System.Int16.Parse(StrColor_Hex.Substring(5, 2), System.Globalization.NumberStyles.AllowHexSpecifier)
End With
Return FindRgb
End Function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-11-10
展开全部
Public Structure RGB
Dim RED As Integer
Dim GREEN As Integer
Dim BLUE As Integer
End Structure
Private Function FindRGB(ByVal color As Integer) As RGB
With FindRGB
.RED = color Mod 256
.GREEN = (color \ 256) Mod 256
.BLUE = color \ 256 \ 256
End With
Return FindRGB
End Function
Dim RED As Integer
Dim GREEN As Integer
Dim BLUE As Integer
End Structure
Private Function FindRGB(ByVal color As Integer) As RGB
With FindRGB
.RED = color Mod 256
.GREEN = (color \ 256) Mod 256
.BLUE = color \ 256 \ 256
End With
Return FindRGB
End Function
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询