The Lights sample shows how to turn on and move the various types of Direct3D lights. The lights fly around, illuminating the scene, and switch every few seconds to a new light type.
Source: (SDK root)\Samples\Multimedia\D3dim\Src\Lights
Executable: (SDK root)\Samples\Multimedia\D3dim\Bin
Press F1 to see available commands.
This sample shows how to set up the D3DLIGHT structure for each of the several types of lights available. It also shows how to dynamically orient the lights on each frame.