Option ExplicitPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const TV_FIRST = &H1100 Private Const TVM_SETITEMHEIGHT = TV_FIRST + 27Function TreeView_SetItemHeight(ByVal hTVWnd As Long, ByVal lHeight As Long) As Long TreeView_SetItemHeight = SendMessage(hTVWnd, TVM_SETITEMHEIGHT, lHeight, ByVal 0) End Function Private Sub Command1_Click() Call TreeView_SetItemHeight(TreeView1.hwnd, 100) End Sub
Private Const TV_FIRST = &H1100
Private Const TVM_SETITEMHEIGHT = TV_FIRST + 27Function TreeView_SetItemHeight(ByVal hTVWnd As Long, ByVal lHeight As Long) As Long
TreeView_SetItemHeight = SendMessage(hTVWnd, TVM_SETITEMHEIGHT, lHeight, ByVal 0)
End Function
Private Sub Command1_Click()
Call TreeView_SetItemHeight(TreeView1.hwnd, 100)
End Sub
加个大号图标,行间距就大了还是supergreenbean(超级绿豆 - 天气酷热,把我煮了熬汤吧) 的专业~~