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
| Private Declare Function BitBlt Lib "gdi32.dll" ( _
ByVal hDestDC As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Const SRCCOPY As Long = &HCC0020
Private Sub Command1_Click()
Picture1.Picture = LoadPicture("C:\Amplifiy.jpg")
Picture2.Height = 200 * Screen.TwipsPerPixelY
Picture2.Width = 200 * Screen.TwipsPerPixelX
Picture2.AutoRedraw = True
BitBlt Picture2.hDC, 0, 0, 200, 200, Picture1.hDC, 0, 0, SRCCOPY
SavePicture Picture2.Image, "C:\ss.bmp"
End Sub |
Partager