我的程序需要实现如下功能:.
.
.
listlog.AddItem msg
listlog.ListIndex = listlog.ListCount - 1 'judge errrate
If Mid(msg, 7, 1) = 0 Then 'errrate is serious
'display msg with red color
'这儿的代码如何写? Call savelog
ElseIf Mid(msg, 7, 1) = 1 Then 'errrate is warning
'display msg with yellow color
'这儿的代码如何写? Call savelog
End If
.
.
listlog.AddItem msg
listlog.ListIndex = listlog.ListCount - 1 'judge errrate
If Mid(msg, 7, 1) = 0 Then 'errrate is serious
'display msg with red color
'这儿的代码如何写? Call savelog
ElseIf Mid(msg, 7, 1) = 1 Then 'errrate is warning
'display msg with yellow color
'这儿的代码如何写? Call savelog
End If
http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Boxes/Owner_Draw_Combo_and_List_Box/article.asp
http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Boxes/Owner_Draw_Combo_and_List_Box/VB6_Owner_Draw_Combo_List_Full_Source.asp
下载例子简单点就用LISTVIEW吧