title: Drawing a line with DirectX C#
body: <p>I'm trying to draw a simple line using DirectX9 and encountered the following:</p>
  
  <p>When the code reach the line:</p>
  
  <pre><code>Device device = new Device( some example code I'v found); 
  </code></pre>
  
  <p>The location of the form is changing in a periodic manner, meaning every time the program executes. I see (in debug mode) that the form location properties change and return to their original values on the 6th execution.  Why?</p>
  
  <p>Upon resizing the code throw a general exception pointing to the line </p>
  
  <pre><code>device.DrawUserPrimitive(..) 
  </code></pre>