VB.net如何检查两个画笔是否相同或相同?

时间:2013-11-12 22:45:40

标签: vb.net brushes

如何判断两把画笔是否相等

tColor1 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor2 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor3 = Brushes.LightGray

如何比较这些突发并在tColor1 = tColor2时得到真实,为tColor1 = tColor3得到假?

1 个答案:

答案 0 :(得分:1)

    Dim tColor1 As SolidColorBrush = CType(New BrushConverter().ConvertFrom("#FF89DE93"), SolidColorBrush)
    Dim tColor2 As SolidColorBrush = CType(New BrushConverter().ConvertFrom("#FF89DE93"), SolidColorBrush)
    Dim tColor3 = Brushes.LightGray

    Dim test As Boolean


    test = tColor1.Color = tColor2.Color 'True
    test = tColor1.Color = tColor3.Color 'False