/// <summary> /// The main entry point for the application. /// </summary> static void Main() { using (CreateDevice frm = new CreateDevice()) { if (!frm.InitializeGraphics()) // Initialize Direct3D { MessageBox.Show("Could not initialize Direct3D. This tutorial will exit."); return; } frm.Show(); // While the form is still valid, render and process messages while (frm.Created) { frm.Render(); Application.DoEvents(); } } }
/// <summary>The main entry point for the application. </summary> static void Main() { using (CreateDevice frm = new CreateDevice()) { if (!frm.InitializeGraphics()) // Initialize Direct3D { MessageBox.Show("Could not initialize Direct3D. This program will exit."); return; } frm.Show(); // While the form is still valid, render and process messages while(frm.Created) { frm.Render(); Application.DoEvents(); } } }