运行时拉伸和移动控件的类
作者: 来源: 添加时间:2006-5-21 19:56:42If frm Is Nothing Then
Return
End If
ctrlIsResizing = False
If Me.IsMoving Then
ctrlRectangle.Location = New System.Drawing.Point(Me.ctrlLeft, Me.ctrlTop)
ctrlRectangle.Size = New System.Drawing.Size(ctrlWidth, ctrlHeight)
ControlPaint.DrawReversibleFrame(ctrlRectangle, Color.Empty, System.Windows.Forms.FrameStyle.Dashed)
Me.ctrl.Left = Me.ctrlLeft - Me.frm.DesktopLocation.X - Me.Wtap
Me.ctrl.Top = Me.ctrlTop - Me.frm.DesktopLocation.Y - Me.Htap
Me.IsMoving = False
Me.ctrl.Refresh()
Return
End If
ctrlRectangle.Location = New System.Drawing.Point(Me.frm.DesktopLocation.X + Me.Wtap + Me.ctrl.Left, Me.frm.DesktopLocation.Y + Me.Htap + Me.ctrl.Top)
ctrlRectangle.Size = New System.Drawing.Size(ctrlWidth, ctrlHeight)
ControlPaint.DrawReversibleFrame(ctrlRectangle, Color.Empty, System.Windows.Forms.FrameStyle.Dashed)
Me.ctrl.Width = ctrlWidth
Me.ctrl.Height = ctrlHeight
Me.ctrl.Refresh()
End Sub
End Class