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

推荐订阅源

AWS News Blog
AWS News Blog
T
Tenable Blog
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
T
Threat Research - Cisco Blogs
T
Threatpost
Security Latest
Security Latest
C
Cisco Blogs
L
Lohrmann on Cybersecurity
S
Security @ Cisco Blogs
Google Online Security Blog
Google Online Security Blog
NISL@THU
NISL@THU
AI
AI
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Hacker News: Front Page
U
Unit 42
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MyScale Blog
MyScale Blog
O
OpenAI News
Scott Helme
Scott Helme
V2EX - 技术
V2EX - 技术
P
Proofpoint News Feed
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cyberwarzone
Cyberwarzone
博客园 - 【当耐特】
H
Heimdal Security Blog
S
Schneier on Security
阮一峰的网络日志
阮一峰的网络日志
Help Net Security
Help Net Security
D
DataBreaches.Net
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
TaoSecurity Blog
TaoSecurity Blog
K
Kaspersky official blog
N
News and Events Feed by Topic
WordPress大学
WordPress大学
P
Palo Alto Networks Blog

博客园 - 学剑学诗两不成

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