I'm trying to use Direct Draw 7 with a picture box in VB6. So I've tried to set the surface it's going to be drawing to to be a picture box with the name Picture1. To do that you are supposed to be able to use the command like this:
Unfortunately doing this gets me this unexplained error:
Run-time error '-2005532417 (887600ff)':
Automation Error
It doesn't say anything to clue me in as to what the problem is. If you try to divide by 0 in VB6 you get an error that says something like "division by zero" or "overflow". It explains the problem. When using DirectX 7's Direct Draw features though, any error that's encountered is NOT explained. I have NO CLUE what "automation error" means. It sounds like some meaningless "technobable" from Star Trek.
Code:
Dim DDS as DirectDrawSurface7
set DDS=DD.GetSurfaceFromDC(Picture1.hDC)
Quote:
Run-time error '-2005532417 (887600ff)':
Automation Error