1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
Dim CLic As Single
Private Sub Form_Load()
With Picture1
.AutoRedraw = True
.AutoSize = True
.Appearance = 0
.BorderStyle = 0
End With
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'là c'est du bricolage
If (X >= (Picture1.Width - 135) And X <= (Picture1.Width)) And (Y >= Picture1.Height - 135) And Y <= Picture1.Height Then
Picture1.MousePointer = vbSizeNWSE
CLic = 1
Xa = X: Ya = Y
End If
End SubEnd Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X < 0 Or Y < 0 Then Exit Sub
If CLic = 1 Then
Form1.Refresh
Picture1.Width = X
Picture1.Height = Y
Picture1.PaintPicture Picture1.Picture, 0, 0, Picture1.Width, Picture1.Height, opcode:=vbSrcCopy
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Width = X
Picture1.Height = Y
CLic = 0
Picture1.MousePointer = vbArrow
End Sub |
Partager