   WindowMessage object in C#
  I've looked at Tom Miller's alternative to a better render loop, but I'm having trouble implementing it.  As my problem seems to be a C# library problem, rather than a DirectX problem, I am posting it here.My current problem is:  What DLL does the "WindowMessage" object belong to?  I have done numerous internet searches, but they all come up empty....  Most of the time, search engines interpret it as a typo ("window message").Does anyone know what DLL I need to include?  ("using System..."?)   
  There was a thread around here at one point that addressed this issue, but I can't for the life of me remember when I saw it.  If you change WindowMessage to uint, it should work okay for you.  Someone here (sorry...it's in Google cache), even said that changing it to Int32 seemed to work without any problems (I guess you would use this if you wanted to write CLS-compliant code).HTH!   ;  Thanks, that seems to have done the trick.But now I have a problem with the NativeMethods namespace.  At first, it told me it was unrecognized.  After a bit of searching, I linked to the "Microsoft.Win32" DLL.  But now it tells me that NativeMethods is inaccessible due to its protection level?  Did I include the wrong DLL, or am I missing something here?   ;  You don't need to connect to Microsoft.Win32.  Just put the Message struct and DllImport function definition in a class called "NativeMethods."  That should do the trick. [smile]   ;  Awesome!  That seems to be the key step no one was mentioning!I've got that new render loop up and running and it's a beautiful thing!Thanks again for the help.   