下面这个达到我理想的解决方案
在VB2005下运行
1,属性中ShowNodeTooltips=false
2,
Private Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" (ByVal hwnd As Integer, ByVal nIndex As Integer, _
ByVal dwNewLong As Integer) As Integer
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" (ByVal hwnd As Integer, ByVal nIndex As Integer) _
As Integer
Private Const TVS_NOTOOLTIPS = &H80
Private Const GWL_STYLE = (-16)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dwStyle As integer
dwStyle = GetWindowLong(TreeView1.Handle.ToInt32, GWL_STYLE)
If (dwStyle And TVS_NOTOOLTIPS) = False Then
Call SetWindowLong(TreeView1.Handle.ToInt32, GWL_STYLE, _
dwStyle Or TVS_NOTOOLTIPS)
End If
End Sub
这样完全禁止了鼠标经过treeview结点时tooltip的显示。可以结帖了!
[
本帖最后由 nhhykly9d 于 2010-10-20 23:34 编辑 ]