Yet another note for future reference. If you are using SlimDX, and you get the exception:
SlimDX.Direct3D9.Direct3DX9NotFoundException was unhandled
Message=Direct3DX 9 was not found. Please install the latest
DirectX end-user redistributable package from Microsoft.
Message=External component has thrown an exception.
at D3DXCheckVersion(UInt32 , UInt32 )
when trying to create a SlimDX.Direct3D9.Direct3D object, most likely you will be able to solve this by placing D3DX9_43.dll into your output folder. Please note that the proper solution would be to install the full DirectX 9 runtime into your system, but it may be too much for some quick testing.
A similar error may occur when using SharpDX, but in SharpDX’s case, the error message will be much more helpful and actually tell you what is missing.