惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
博客园_首页
雷峰网
雷峰网
V
Visual Studio Blog
爱范儿
爱范儿
A
About on SuperTechFans
量子位
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
S
SegmentFault 最新的问题
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 学剑学诗两不成

VB:如何实现在代码中弹出toolbar的ButtonMenu VB:如何发送WM_KEYDOWN和WM_KEYUP消息 利用IDocHostUIHandler接口屏蔽WebBrowser的弹出菜单 VB:如何改变ComboBox自身的高度 VB:如何设置Richtextbox的行间距 VB:如何允许/禁止RICHTEXTBOX中的OLE对象拉伸 一个很有用的自定义函数 - 学剑学诗两不成 - 博客园 VB:如何启用/禁用本地连接 VB:如何选定文件或文件夹 - 学剑学诗两不成 - 博客园 一个远程调用api函数的模块(转贴) VB:如何用需要身份验证的SMTP邮件服务器发信 - 学剑学诗两不成 - 博客园 VB:如何监听打开的窗口和程序 VB:如何隐藏ListView的某一列 vb:如何禁止鼠标指针进入某个区域 如何使frame控件的caption居中显示 - 学剑学诗两不成 - 博客园 怎样去掉窗体上的图标 - 学剑学诗两不成 - 博客园 VB中对string array快速插入、删除某个元素的办法 - 学剑学诗两不成 - 博客园 bug:在windows xp下用ImageList_GetImageCount返回值不正确(VB) - 学剑学诗两不成 - 博客园 VB中字符串数组快速复制的一种方法 - 学剑学诗两不成 - 博客园
VB:如何隐藏/显示treeview的ToolTips - 学剑学诗两不成 - 博...
学剑学诗两不成 · 2006-02-11 · via 博客园 - 学剑学诗两不成

没什么需要特别说明说的,有疑问就看msdn吧,窗体上两个按钮,一个treeview:
Option Explicit
Private Declare Function SetWindowLong Lib "user32" _
 Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _
 ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" _
 Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) _
 As Long

Private Const TVS_NOTOOLTIPS = &H80
Private Const GWL_STYLE = (-16)

Private Sub ShowToolTips(TreeView As TreeView)
  Dim nStyles As Long
 
  With TreeView
    nStyles = GetWindowLong(.hwnd, GWL_STYLE)
    nStyles = nStyles And (Not TVS_NOTOOLTIPS)
    SetWindowLong .hwnd, GWL_STYLE, nStyles
  End With
End Sub

Private Sub HideToolTips(TreeView As TreeView)
  Dim nStyles As Long
 
  With TreeView
    nStyles = GetWindowLong(.hwnd, GWL_STYLE)
    nStyles = nStyles Or TVS_NOTOOLTIPS
    SetWindowLong .hwnd, GWL_STYLE, nStyles
  End With
End Sub

Private Sub Command1_Click()
    HideToolTips Me.TreeView1
End Sub

Private Sub Command2_Click()
    ShowToolTips Me.TreeView1
End Sub

Private Sub Form_Load()
    Command1.Caption = "隐藏ToolTips"
    Command2.Caption = "显示ToolTips"
    Dim i As Long
    For i = 1 To 100
    Me.TreeView1.Nodes.Add , , , "hello this is test hello this is test hello this is test" & CStr(i)
    Next
End Sub