Private Sub pic_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseMove
curx = e.X
cury = e.Y
End Sub
Private Sub pic_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseDown
If e.Button = MouseButtons.Left Then
startx = pic.Location.X
starty = pic.Location.Y
myTime.Interval = 1
myTime.Enabled = True
myTime.Start()
counter = True
End If
End Sub
Private Sub myTime_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTime.Tick
If counter Then
gr = pic.CreateGraphics
gr.DrawRectangle(Pens.Black, startx, starty, curx - startx, cury - starty)
pic.Invalidate()
gr.Dispose()
End If
End Sub
Private Sub pic_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseUp
myTime.Stop()
myTime.Enabled = False
End Sub
twinzco писал(а):А в версии VS.NET 2005 уже есть? А как пользоваться?
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 85