VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5355
ClientLeft = 1560
ClientTop = 1920
ClientWidth = 6420
LinkTopic = "Form1"
ScaleHeight = 5355
ScaleWidth = 6420
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 765
Left = 1920
TabIndex = 2
Top = 4230
Width = 2685
End
Begin VB.PictureBox Picture2
Height = 1125
Left = 1380
ScaleHeight = 1065
ScaleWidth = 2745
TabIndex = 1
Top = 2580
Width = 2805
End
Begin VB.PictureBox Picture1
Height = 1005
Left = 1440
ScaleHeight = 945
ScaleWidth = 2625
TabIndex = 0
Top = 750
Width = 2685
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const SRCCOPY = &HCC0020
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc 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 nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Private Sub Command1_Click()
Dim lw As Long
lw = Picture1.Picture.Width
Dim lh As Long
lh = Picture1.Picture.Height
MsgBox StretchBlt(Picture2.hdc, 0, 0, lw, lh, Picture1.hdc, 0, 0, lw, lh, SRCCOPY)
End Sub
Private Sub Form_Load()
Set Picture1 = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Bitmaps\Assorted\Beany.bmp")
End Sub