If e.Sender.Name.StartsWith("组织") Then
If e.Sender.BackColor=Color.White Then
e.Sender.BackColor=Color.Black
Else
e.Sender.BackColor=Color.White
End If
Dim s As String
For Each c As Winform.Control In e.Form.Controls
If c.Name.StartsWith("组织") AndAlso c.BackColor <> Color.White Then
Dim clr As Color = c.BackColor
Dim c1 As String = "#" & Format(clr.R,"X2") & Format(clr.G,"X2") & Format(clr.B,"X2")
Dim c2 As String =c.Name.SubString(2,5)
Dim c3 As String =c2 & "|" & c1
s=s & c3
End If
Next
s = s.trim("|")
MessageBox.Show(s)
Tables("表A").Current("组织图") = s
End If