�� �� thinkforest (thinkforest) �拇������到: ��
�约��定�耍�google������
Use PaintPicture to copy the picture from the source PictureBox to the destination PictureBox, resizing it appropriately. Set the result PictureBox's Picture property equal to its Image property to make the image permanent. Then use SavePicture to save the results into a bitmap file.
Private Sub Command1_Click()
Dim file_name As String
' Resize the picture.
Picture2.AutoRedraw = True
Picture2.PaintPicture Picture1.Picture, _
Picture2.ScaleLeft, Picture2.ScaleTop, _
Picture2.ScaleWidth, Picture2.ScaleHeight, _
Picture1.ScaleLeft, Picture1.ScaleTop, _
Picture1.ScaleWidth, Picture1.ScaleHeight
Picture2.Picture = Picture2.Image
' Save the result.
file_name = App.Path
If Right$(file_name, 1) <> "\" Then file_name = _
file_name & "\"
SavePicture Picture2.Picture, file_name & "small.bmp"
End Sub
Private Sub Form_Load()
Dim edge As Single
edge = Picture1.Width - Picture1.ScaleWidth
Picture2.Width = (Picture1.Width - edge) / 2 + edge
Picture2.Height = (Picture1.Height - edge) / 2 + edge
Me.Width = Picture2.Left + Picture2.Width + 240
End Sub
--
[m[33m�� ��源:��水木���� http://newsmth.net��[FROM: 218.57.243.*][m