aaahhhrrggghhhh
Programmer
Hi.
I am just learning to use DirectX and have tried the following code (VB). I am using VB6 on WinXP. I have checked the boxes for :
DirectX7 for Visual Basic Type Library ... and
DirectX8 for Visual Basic Type Library.
I get the error :
Runtime error '-2005532460 (887600d4)'
Automation Error
on the CreateSurfaceFromFile Line. I have tried CreateSurface, but still receive the same error.
What to do?
Mr Unhappy.
The code is :
Private Sub Form_Load()
Dim oDX As DirectX7
Dim oDD As DirectDraw7
Dim oDDS As DirectDrawSurface7
Dim oDDSD As DDSURFACEDESC2
Set oDX = New DirectX7
Set oDD = oDX.DirectDrawCreate(""
With oDDSD
.lFlags = DDSD_CAPS Or DDSD_WIDTH Or DDSD_HEIGHT
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
.lWidth = Me.OLEUnbound1.Width
.lHeight = Me.OLEUnbound1.Height
End With
Set oDDS = oDD.CreateSurfaceFromFile("c:\winnt\backgrounds\nicksian.bmp", oDDSD)
End Sub
Dont be small. be BIG
I am just learning to use DirectX and have tried the following code (VB). I am using VB6 on WinXP. I have checked the boxes for :
DirectX7 for Visual Basic Type Library ... and
DirectX8 for Visual Basic Type Library.
I get the error :
Runtime error '-2005532460 (887600d4)'
Automation Error
on the CreateSurfaceFromFile Line. I have tried CreateSurface, but still receive the same error.
What to do?
Mr Unhappy.
The code is :
Private Sub Form_Load()
Dim oDX As DirectX7
Dim oDD As DirectDraw7
Dim oDDS As DirectDrawSurface7
Dim oDDSD As DDSURFACEDESC2
Set oDX = New DirectX7
Set oDD = oDX.DirectDrawCreate(""
With oDDSD
.lFlags = DDSD_CAPS Or DDSD_WIDTH Or DDSD_HEIGHT
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
.lWidth = Me.OLEUnbound1.Width
.lHeight = Me.OLEUnbound1.Height
End With
Set oDDS = oDD.CreateSurfaceFromFile("c:\winnt\backgrounds\nicksian.bmp", oDDSD)
End Sub
Dont be small. be BIG