|
-
Oct 11th, 2001, 06:44 PM
#1
Thread Starter
Frenzied Member
bitblt - error!!!!
Hello all,
I seem to be having a little bit of a problem with bitblt - no pun intended!! Here is my call -->
Public 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
Public Const SRCCOPY = &HCC0020
and here is how I'm trying to use it
Private Sub Command1_Click()
bitblt(picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy)
End Sub
I keep getting an "expected: =" error... What do I need???
Thanx for the help!
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Oct 11th, 2001, 06:48 PM
#2
Member
You have to do:
VB Code:
temp = bitblt(picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy)
Or
VB Code:
bitblt picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy
-
Oct 11th, 2001, 11:51 PM
#3
Addicted Member
bitblt should work the way he had it. he just needed to leave the parenthesis off for it to work. other wise the computer thinks you're trying to assign the value returned by bitblt to something when it's clear that is not what you are doing.
hope this clarifies.
Drewski
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
-
Oct 12th, 2001, 02:36 AM
#4
Retired VBF Adm1nistrator
Also use the vbSrcCopy constant instead of srccopy.
Looks better
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 12th, 2001, 04:43 PM
#5
Thread Starter
Frenzied Member
Thanx Every1
Thank you every1 for your help...
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
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
|