Dim t As Table = Tables("表A") Dim cs1 As C1.Win.C1FlexGrid.CellStyle = t.grid.Styles.Add("cs2") cs1.Border.Color = Color.Red For i As Integer = t.TopPosition To t.BottomPosition For j As Integer = t.LeftCol To t.RightCol t.grid.SetCellStyle(i+1, j+1, cs1) Next Next