Click to See Complete Forum and Search --> : C# with Direct3D; SpriteFlags unrecognized


woodsman
February 14th, 2004, 11:54 AM
I'm attempting to run code from the book Managed DirectX 9 and seem to have run into a problem on the chapter where the author discussed using sprites.

sprite.Begin(SpriteFlags.AlphaBlend)

The errors are:
E:\Prog\Visual Studio Projects\C# Projects\DXTest1\Form1.cs(104):
The type or namespace name 'SpriteFlags' could not
be found (are you missing a using directive or an assembly reference?)
E:\Prog\Visual Studio Projects\C# Projects\DXTest1\Form1.cs(204):
No overload for method 'Draw' takes '5' arguments
I can probably figure out the Draw function given the MSDN, but for the life of me I can't seem to see my error.
MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/ref/ns/microsoft.directx.direct3d/e/spriteflags/spriteflags.asp) says:
Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3DX (Microsoft.DirectX.Direct3DX.dll)

Which I've included. Has anyone else run into this or know what is wrong? I'm stumped.

pareshgh
February 17th, 2004, 12:58 AM
there are 3 problems in your case upfront,

1) Check your references in your project , if it has exclaimation sign then it is a problem,

2) reffered dll is not in the path

3) check the dll needs to be strong and in gac..


in am not sure abt point 3.

if all of above points seems to be ok then check
SpriteFlags.AlphaBlend enum namespace,



Paresh