VB中Picturebox 用MOVE方法移动后怎样恢复他的原先位置?
VB中Picturebox用MOVE方法在窗体移动改变位置后怎样又恢复其原本的位置呢????谢谢...
VB中Picturebox 用MOVE方法在窗体移动改变位置后怎样又恢复其原本的位置呢????谢谢
展开
1个回答
展开全部
在Move之灶搏前记录下PictureBox的Left和Top属性。如:
Dim intLeft As Integer
Dim intTop As Integer
Private Sub Form_Load()
intLeft = Picture1.Left
intTop = Picture1.Top
End Sub
在执行Move以后:哪燃(假设点李辩虚击一个按钮恢复)
Private Sub Command1_Click()
Picture1.Left = intLeft
Picture1.Top = intTop
End Sub
Dim intLeft As Integer
Dim intTop As Integer
Private Sub Form_Load()
intLeft = Picture1.Left
intTop = Picture1.Top
End Sub
在执行Move以后:哪燃(假设点李辩虚击一个按钮恢复)
Private Sub Command1_Click()
Picture1.Left = intLeft
Picture1.Top = intTop
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询