如何设置MSFlexGrid1控件
如何设置MSFlexGrid1控件?
1:我想把第一行去掉,不知道如何去掉?
2:我想把第一排的灰色改成白色的,如何做?
------------------------------------
代码如下:
Dim sqlstr As String
Dim msgtext As String
Dim ret As ADODB.Recordset
sqlstr = "select * from userinfo"
Set ret = executeSQL(sqlstr, msgtext)
With MSFlexGrid1
.Rows = 2
.CellAlignment = 4
.TextMatrix(1, 0) = "用户名"
.TextMatrix(1, 1) = "密码"
Do While Not ret.EOF
.Rows = .Rows + 1
.CellAlignment = 4
.TextMatrix(.Rows - 1, 0) = ret.Fields(0)
.TextMatrix(.Rows - 1, 1) = ret.Fields(1)
ret.MoveNext
Loop
End With
ret.Close