I have been through many tutorials, and have seen many variations doing things a number of different ways- I want to know what is the best way, or preferred way, or "Official Microsoft way", to handle the main render loop specifically for C# and the latest DirectX.
Some use the Application.Idle event handler to call the render method.
Some use the standard Paint method to call the render method, followed immediately by a call to invalidate.
Some use a timer to call the render method.
I have tried all three, and with all three the responsiveness slows down to a crawl with only 100 boxes, and locks up when the keyboard buffer gets full. I am not using DirectInput, I'm using the standard KeyUp and KeyDown events.

The best way to handle the render loop?
zzdg
Well, it seems the Application.Idle render loop is the preferred way, since Tom Miller calls it his final post on render loops. "Simple, elegant, effective. No extra allocations, no extra collections, it just works.." is his assesment of this approach and I think he's quite right
I don't think there really is an official way to do this, since the way you set up your render loop depends a lot on what you want to do with it. For a tool of mine for example, I only render when the Application.Idle event fires, without the AppStillIdle loop. Since the tool doesn't need 60+ frames per minute, this works out quite well. For typical games or other realtime rendering apps though, I'd go with the Application.Idle & AppStillIdle loop.
You could try using the Window Messages directly (by overriding your Form or Control's WndProc method) instead of using the events to solve your keyboard issues, since Windows Messages are typically much more efficient. However, the events really shouldn't be causing the lockups, so you might want to check if your render loop isn't preventing any messages from getting handled.
For some more suggestions on improving the performance when rendering a lot of small meshes, check this thread on GameDev.net.
Mark The Archer Evans