ورود

View Full Version : آموزش: سوال:واران کردن تصویر



salamu
چهارشنبه 11 بهمن 1391, 20:57 عصر
با کد زیر میشه یه عکسو طبق محور y ها آینه ای کرد حالا برا محور x ها چی؟هر جوری پارامتر هاش رو عوض کردم نشد:

Private Sub Command1_Click()
With Me.Picture1
.AutoRedraw = True
.Width = Picture1.Width
.Height = Picture1.Height
.PaintPicture Picture1.Picture, _
Picture1.ScaleWidth, 0, _
-Picture1.ScaleWidth, Picture1.ScaleHeight
.Picture = .Image
.Refresh
End With
End Sub

the king
چهارشنبه 11 بهمن 1391, 23:23 عصر
با کد زیر میشه یه عکسو طبق محور y ها آینه ای کرد حالا برا محور x ها چی؟هر جوری پارامتر هاش رو عوض کردم نشد:

Private Sub Command1_Click()
With Me.Picture1
.AutoRedraw = True
.Width = Picture1.Width
.Height = Picture1.Height
.PaintPicture Picture1.Picture, _
Picture1.ScaleWidth, 0, _
-Picture1.ScaleWidth, Picture1.ScaleHeight
.Picture = .Image
.Refresh
End With
End Sub



Private Sub Command1_Click()
With Me.Picture1
.AutoRedraw = True
.AutoSize = True
.ScaleMode = vbPixels
.PaintPicture Picture1.Picture, _
0, Picture1.ScaleHeight, _
Picture1.ScaleWidth, -Picture1.ScaleHeight
.Picture = .Image
.Refresh
End With
End Sub