如何让treeview拖动接点时,如果超出视图范围时,scroll自动滚动
解决方案 »
- AtEndOfLine与AtEndOfStream的区别
- ~~~~~~~~~~~~~~~关于安装程序的制作
- 【新人求助】帮忙看看写的对么?
- 挑战你的知识深广度:怎样使多文档窗体中的母窗体不能最大化?母窗体并没有相应的属性可供设置!
- 关于两个程序间消息交换问题.
- 200求:通过Inet控件上传文件给IIS(跟IE里面的<input type=file>一样)。
- sql查询问题(在线
- RasDial 如何调用的.这API是从《程序员》2001年下册中抄的。真TMD《程序员》,浪费钱财。
- 关于VB监控USB接口打印机的状态的
- 注册表的一个棘手的问题,win2000下的RegCreateKeyEx ?????????!!!!
- 查询记录
- 如何在VB中将Excel动态转换成Access?请高手帮忙。(急)
Const SB_LINEUP = 2
Const WM_HSCROLL = &H114
Const WM_VSCROLL = &H115
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As LongPrivate Sub tvwLayer_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer) If y > 0 And y < 30 Then
m_iScrollDir = -1
Timer1.Enabled = True
ElseIf y > (tvwLayer.Height - 30) And _
y < tvwLayer.Height Then
m_iScrollDir = 1
Timer1.Enabled = True
Else
m_iScrollDir = 0
Timer1.Enabled = False
End If
End SubPrivate Sub Timer1_Timer()
If m_iScrollDir = 1 Then
'向下滚动
SendMessage tvwLayer.hwnd, WM_VSCROLL, SB_LINEDOWN, ByVal 0&
ElseIf m_iScrollDir = -1 Then
'向上滚动
SendMessage tvwLayer.hwnd, WM_VSCROLL, SB_LINEUP, ByVal 0&
End If
End Sub