Zoom question (copy from FOX's forum)
The Question is: I thy to using next SUB to Zoom out a picture, and I always get a picture trim by orignal width and height of picture in that icturebox(Front), I think TempDC and TileDC is fixed size at SelectObject API
Can I adjust Width and Height of a DC that is created by using CreateCompatibleDC API?
a testing code is derived from FOX's OffscreenDC :
Private Sub cmdZoomOut_Click()
Dim newW As Long, newH As Long
Screen.MousePointer = vbHourglass
If plus < 10 Then
plus = plus + 1
newW = W * plus
newH = H * plus
StretchBlt TempDC, 0, 0, newW, newH, TileDC, 0, 0, W, H, vbSrcCopy
'TempDc and TileDc is created using loadDC method from mCore Module
BitBlt Front.hdc, 0, 0, newW, newH, TempDC, 0, 0, vbSrcCopy
'Front is a picturebox for display
'If above 2 statements is replaced by (StretchBlt front.hdc, 0, 0, newW, newH, TileDC, 0, 0, W, H, vbSrcCopy)
'I can get result i need, but newW/newH is limited in about 3000pixels and speed is intolerable.
Front.SetFocus
Screen.MousePointer = vbDefault
End If
End Sub