|
-
Feb 22nd, 2002, 07:09 PM
#1
Thread Starter
Lively Member
What am I doing Wrong?
I am trying to use the StrechBlt Function, but nothing happens.
Code:
Option Explicit
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 Declare Function BitBlt Lib "gdi32" (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 Sub Form_Load()
picPreviewFront.Picture = frmMain.imgFront.Picture
StretchBlt picPreviewFront.hdc, 12288, 7380, ScaleWidth, ScaleHeight, frmPreviewFront.hdc, 12288, 7380, picPreviewFront.ScaleWidth, picPreviewFront.ScaleHeight, vbSrcCopy
End Sub
Private Sub mnuFileRefresh_Click()
Refresh
End Sub
Last edited by LBS; Feb 22nd, 2002 at 07:12 PM.
-
Feb 22nd, 2002, 07:11 PM
#2
Thread Starter
Lively Member
The reason the BitBlt function is in there is because I am using it for my printing code, which I did not put in there.
-
Feb 22nd, 2002, 07:21 PM
#3
Fanatic Member
Numero Uno (means number one):
I hate the Windows GDI functions. Strange enough, Windows was not designed for graphics!
Numero Dos (means number.... oh, you get it, do you?)
I have had a ***** with that StretchBlt .. I do not have the code at hand at the time of writing, but if you want a working example, I'll send you the code in a few days.
I need to get access to another machine to do so.
Something tells me, though, that you have to fiddle with the AutoRedraw properties.
-
Feb 23rd, 2002, 12:21 PM
#4
Thread Starter
Lively Member
I'd appreciate it if you sent me the working example. ty
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|