nodX.EnsureVisible
TreeView1.style = tvwTreelinesText ' Style 4.
TreeView1.BorderStyle = vbFixedSingle
End Sub
Private Sub Command1_Click()
Dim lngStyle As Long
Call SendMessage(TreeView1.hWnd, TVM_SETBKCOLOR, 0, ByVal #ff0000)
'改变背景到红色
lngStyle = GetWindowLong(TreeView1.hWnd, GWL_STYLE)
Call SetWindowLong(TreeView1.hWnd, GWL_STYLE, lngStyle - TVS_HASLINES)
Call SetWindowLong(TreeView1.hWnd, GWL_STYLE, lngStyle)
End Sub

相关文章:

  • 2021-04-28
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2023-03-17
  • 2021-08-28
  • 2023-02-16
  • 2022-01-18
  • 2021-05-26
相关资源
相似解决方案