title: Simple c# directX example
body: <p>I try to start c# directX programming with this tutorial:
  <a href="http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series1/tut2.php" rel="nofollow noreferrer">http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series1/tut2.php</a>
  I'm using visual Studion Community 2015, my code is like this:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using Microsoft.DirectX;
  using Microsoft.DirectX.Direct3D;
  
  namespace DirecxTest01
  {
      public partial class Form1 : Form
      {
          private Device device;
          public Form1()
          {
              InitializeComponent();
              InitializeDevice();
          }
          private void InitializeDevice()
          {
              PresentParameters presentParams = new PresentParameters();
              presentParams.Windowed = true;
              presentParams.SwapEffect = SwapEffect.Discard;
              device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);
          }
          private void Form1_Paint(object sender, PaintEventArgs e)
          {
              device.Clear(ClearFlags.Target, Color.DarkSlateBlue, 1.0f, 0);
              device.Present();
          }
      }
  }
  </code></pre>
  
  <p>I also addesd References to all the DirectX dll's. Whe I run the Programm nothing happened, not even the Form Window appers. No error message, just nothing. I tried to comment out the DirectX Stuff line by line. Even with this code the Programm hangs up:</p>
  
  <pre><code>private void InitializeDevice()
      {
          PresentParameters presentParams = new PresentParameters();
          //presentParams.Windowed = true;
          //presentParams.SwapEffect = SwapEffect.Discard;
          //device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);
          }
  </code></pre>
  
  <p>When I out comment</p>
  
  <p><code>//PresentParameters presentParams = new PresentParameters();</code></p>
  
  <p>to, at least the Windowas Form apperears.</p>
  
  <p>Whats wrong with my code?</p>