dan800913
路人甲
路人甲
  • 注册日期2005-01-10
  • 发帖数102
  • QQ
  • 铜币617枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1479回复:2

ae+vbnet自定义工具条,如何实现鼠标在工具条上悬停,在状态栏上显示相应的提示信息?

楼主#
更多 发布于:2005-09-03 16:34
<P>各位大侠好!</P>
<P>我现在遇到一个问题,想通过鼠标在自定义工具条上悬停,在状态栏上显示相应得提示信息,代码如下,为什么调试的时候在状态栏上没有显示相应的信息呢?请各位帮忙!</P>
<P>Private Sub ToolBar1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ToolBar1.MouseMove<BR>        Dim found As Boolean<BR>        Dim m_Ptbbutton As New ToolBarButton<BR>        Dim Index As Long<BR>        For Index = 0 To ToolBar1.Buttons.Count - 1<BR>             m_Ptbbutton = ToolBar1.Buttons(Index)<BR>              If (e.X > m_Ptbbutton.Rectangle.Left) And _<BR>               (e.X < (m_Ptbbutton.Rectangle.Left + m_Ptbbutton.Rectangle.Width)) And _<BR>               (e.Y > m_Ptbbutton.Rectangle.Top) And _<BR>               (e.Y < (m_Ptbbutton.Rectangle.Top + m_Ptbbutton.Rectangle.Height)) Then<BR>                 If StatusBar1.Panels(0).Text <> m_Ptbbutton.ToolTipText Then<BR>                    StatusBar1.Panels(0).Text = m_Ptbbutton.ToolTipText<BR>                End If<BR>                <BR>                found = True<BR>                <BR>                Exit For<BR>            End If<BR>        Next<BR>        If Not found Then<BR>            StatusBar1.Panels(0).Text = ""<BR>        End If<BR>    End Sub</P>
喜欢0 评分0
kisssy
卧底
卧底
  • 注册日期2004-04-18
  • 发帖数235
  • QQ
  • 铜币614枚
  • 威望2点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-09-03 21:10
StatusBar1.ShowPanels=true
个人专栏: https://zhuanlan.zhihu.com/c_165676639
举报 回复(0) 喜欢(0)     评分
dan800913
路人甲
路人甲
  • 注册日期2005-01-10
  • 发帖数102
  • QQ
  • 铜币617枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2005-09-04 11:21
谢谢!问题解决了!
举报 回复(0) 喜欢(0)     评分
游客

返回顶部