说明:看了Zhenjialon的动态窗体范例,深受启发。[em19]做了一个
动态窗体函数:AniMoveSize:前面几个参数为窗体改变前
后的位置和宽长,最后一个是改变步长(控制时间)。
另外这个方法还可用在Image和子窗体控件上,做出可以
伸缩面板效果。
上次看了郑板主的另类窗体Demo和写字版调用,令我受益匪浅,这次再次感谢郑板主的范例。
Public Sub AniMoveSize(frmLeft As Integer, frmTop As Integer, frmWidth As Integer, frmHeight As Integer, _
toLeft As Integer, toTop As Integer, toWidth As Integer, toHeight As Integer, intStep As Integer)
Dim i As Integer
For i = 1 To intStep
DoCmd.MoveSize frmLeft + (toLeft - frmLeft) / intStep * i, frmTop + (toTop - frmTop) / intStep * i, _
frmWidth + (toWidth - frmWidth) / intStep * i, frmHeight + (toHeight - frmHeight) / intStep * i
DoEvents
Next
End Sub
[此贴子已经被Trynew于2002-12-21 14:29:29编辑过]
|