CreateSurfaceFromFile in .NET and DX9

peanutman
11-18-2004, 09:29 AM
i'm porting one of my old directdraw projects made in VB6 to .NET
there's this one thing i can't find:


'Sprite = surface
'ddsdNewSprite = surface description, all set and ready

Sprite = DD.CreateSurfaceFromFile(App.Path & "\temp.bmp", ddsdNewSprite)


i searched a lot, but simply can't find the CreateSurfaceFromFile command, or anything like it.

I am using the References for DirectDraw found in the directx9 SDK

So my question is if anyone knows how to do this in .NET with DX9

Reinout,

Iceplug
11-19-2004, 07:50 AM
That's because it's in the constructor.

ObjectSf = New Surface(Picpath & "cubes.bmp", surfDesc, Dev)
where surfDesc is the Surface Description, and Dev is the device.
ObjectSf is the surface. :)

peanutman
11-19-2004, 11:46 AM
cool :p
thanks a lot!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum