给你部分代码,未经验证的,算是个初级算法吧,详细部分如果你有经验就自己想去,没经验就好好学习吧: 在button的mouse enter 过程中加入如下代码: ''这里用groupbox做面板,name 属性为gb用button做获取鼠标焦点来响应面板显示隐藏,属性name为bt。group左端或右端分别紧贴窗体左或右端。 Private Sub Bt_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.MouseEnter If gb.Left >= 528 Then gb.Left = gb.Left - 152 End If End Sub Private Sub Bt_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.MouseLeave If gb.Left <= 376 Then gb.Left = gb.Left + 152 End If希望你能看懂,先告诉一下,这个没有你说的那种动画显示和隐藏的效果,不过要实现这种效果也不是什么难事。我只给你指点一下,具体的呢你自己动脑思考吧!不难的!希望你能自己做出来!另外哪位高手也给我指正下这段代码的不足之处,大家共同进步!谢谢!
或者自己写,用mouse enter mouse leave
你搜索SampleDocking 就ok!
在button的mouse enter 过程中加入如下代码:
''这里用groupbox做面板,name 属性为gb用button做获取鼠标焦点来响应面板显示隐藏,属性name为bt。group左端或右端分别紧贴窗体左或右端。
Private Sub Bt_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.MouseEnter
If gb.Left >= 528 Then
gb.Left = gb.Left - 152
End If
End Sub Private Sub Bt_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.MouseLeave
If gb.Left <= 376 Then
gb.Left = gb.Left + 152
End If希望你能看懂,先告诉一下,这个没有你说的那种动画显示和隐藏的效果,不过要实现这种效果也不是什么难事。我只给你指点一下,具体的呢你自己动脑思考吧!不难的!希望你能自己做出来!另外哪位高手也给我指正下这段代码的不足之处,大家共同进步!谢谢!
DevExpress, Infragistics……一大堆。
write below code
if(themovepanel.width = theminwidth)
themovepanel.width = 300;
in mouseleave event
write below code
themovepanel.width = theminwidth;
in mouseenter event
write below code
if(themovepanel.width == theminwidth)
themovepanel.width = 300;
in mouseleave event
write below code
themovepanel.width = theminwidth;