首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

请教怎样实现qq的卷帘效果

2012-01-09 
请问怎样实现qq的卷帘效果1.比如点击“群/校友录”就网上推开,显示该面板图标内容?2.怎样添加各项图标内容(

请问怎样实现qq的卷帘效果
1.比如点击“群/校友录”就网上推开,显示该面板图标内容?


2.怎样添加各项图标内容(并可以点击响应)?


谢谢

[解决办法]
模擬QQ隱藏窗口

Declare Function GetCursorPos Lib "user32 " (lpPoint As POINTAPI) As Long
Declare Function GetWindowRect Lib "user32 " (ByVal hwnd As Long, lpRect As RECT) As Long
Declare Function PtInRect Lib "user32 " (lpRect As RECT, ByVal ptx As Long, ByVal pty As Long) As Long
Declare Function ShowWindow Lib "user32 " (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Type POINTAPI
X As Long
Y As Long
End Type

Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Sub Form_Load()
Me.Left = 0
End Sub

Sub Timer1_Timer()
Dim MyPoint As POINTAPI
Dim MyRect As RECT
Call GetCursorPos(MyPoint)
Call GetWindowRect(Me.hwnd, MyRect)
If PtInRect(MyRect, MyPoint.X, MyPoint.Y) = 0 Then
Me.Top = 0 - Me.Height + 10
ShowWindow Me.hwnd, 0
Else
ShowWindow Me.hwnd, 5
Me.Top = 0
End If
End Sub

[解决办法]
有例子的 用这个控件CtListBar
[解决办法]
我记得ActiveBar也有类似的功能,而且非常强大

热点排行