Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get bitblt to work? 1

Status
Not open for further replies.

Pete222

Programmer
Dec 29, 2002
85
0
0
GB
Im using bitblt to copy part of a picture into a picturebox but i cant get the code to work:

i have this at the start of the forms code:
Option Explicit
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


and I have this on a command button:
BitBlt Q.hDC, 0, 0, 1200, 360, imgSS.hDC, SSQX.Caption, SSQY.Caption, vbSrcCopy

But when I run the program it doesn't do anything. how do i get it to work?

Pete.
 
We've covered BitBlt (from simple uses to complicated ones) on numerous occassion in this forum. Try doing a keyword search in here and see what you find. If you still have problems just post in this thread again and we'll see what we can do to help out further...
 
I've looked at the threads but I can't work out where you put the code. I've tried a few different combinations but none seem to work. I did find a example project, but copying that code still made no effect. thx, sorry about bringing it up again.

Pete.
 
Sorry..worked it out. i used some information i found of a website and a bit from this bitblt exarmple proggy i download a while ago. thx anyway.

Pete.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top