VB如何做到鼠标移动到窗体上 窗体从屏幕右边向左展开出现?
向各位大侠求助,我要做下面功能的VB程序:想用VB做一个程序,界面如下:

功能要求:
1、 程序运行时,form1窗体在窗口右边隐藏(只出现“学习内容”一列)
2、 鼠标移动窗体上时,form1窗体向左展开。
而且,单击相应的章节,出现具体的教学内容(怎么呈现教学内容都可以)
3、鼠标离开窗体时,form1窗体再折叠回原样。
[此贴子已经被作者于2016-4-1 08:25编辑过]
[此贴子已经被作者于2016-4-1 08:25编辑过]
Option Explicit Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Declare Function GetWindowRect Lib "user32 " (ByVal hwnd As Long, lpRect As RECT) As Long Private Type POINTAPI X As Long Y As Long End Type Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Dim showLargeFrm As Boolean Dim smlWidth, lgWidth As Integer Private Sub Form_Load() smlWidth = 500 lgWidth = 7000 Timer1.Enabled = True Timer1.Interval = 100 Form1.Width = 500 showLargeFrm = False End Sub Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Form1.Width = 7000 showLargeFrm = True End Sub Private Sub Timer1_Timer() If showLargeFrm Then Dim p As POINTAPI, r As RECT GetCursorPos p GetWindowRect Me.hwnd, r If p.X < r.Left Or p.X > r.Right Or p.Y < r.Top Or p.Y > r.Bottom Then Form1.Width = 500 showLargeFrm = False End If End If End Sub