[VB]改变TreeView行间距
|
admin
2013年11月25日 16:45
本文热度 4755
|
Option Explicit
Private 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 + 27
Function 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
该文章在 2013/11/25 16:45:52 编辑过