بیر ینی پوروجکت
ایکی picturebox پوروجکت ارترون
Dim StartX As Single, StartY As Single
Private Sub Form_Activate()
MousePointer = 11
Picture2.PaintPicture Form1.Picture, 0, 0
Picture1.PaintPicture Picture2.Image, 0, 0, Picture1.Width, Picture1.Height, Picture1.Left, Picture1.Top, Picture1.Width, Picture1.Height
Picture1.Line (1, 1)-(Picture1.Width - 1, Picture1.Height - 1), , B
MousePointer = 0
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
StartX = X
StartY = Y
Picture1.AutoRedraw = False
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Left = IIf(X < StartX, Picture1.Left - (StartX - X), Picture1.Left + (X - StartX))
Picture1.Top = IIf(Y < StartY, Picture1.Top - (StartY - Y), Picture1.Top + (Y - StartY))
Picture1.PaintPicture Picture2.Image, 0, 0, Picture1.Width, Picture1.Height, Picture1.Left, Picture1.Top, Picture1.Width, Picture1.Height
Picture1.Line (1, 1)-(Picture1.Width - 1, Picture1.Height - 1), , B
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.AutoRedraw = True
End Sub
وبی کدی اوندا یازون
