diff --git a/Source/Examples/WinForms/W01_First_Window.Designer.cs b/Source/Examples/WinForms/W01_First_Window.Designer.cs index f8fc8583..195e864b 100644 --- a/Source/Examples/WinForms/W01_First_Window.Designer.cs +++ b/Source/Examples/WinForms/W01_First_Window.Designer.cs @@ -78,6 +78,7 @@ this.glControl1.Size = new System.Drawing.Size(629, 565); this.glControl1.TabIndex = 0; this.glControl1.VSync = false; + this.glControl1.Resize += new System.EventHandler(this.glControl1_Resize); this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint); this.glControl1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.glControl1_KeyDown); // diff --git a/Source/Examples/WinForms/W01_First_Window.cs b/Source/Examples/WinForms/W01_First_Window.cs index c0f59f43..eb17fa53 100644 --- a/Source/Examples/WinForms/W01_First_Window.cs +++ b/Source/Examples/WinForms/W01_First_Window.cs @@ -45,6 +45,7 @@ namespace Examples.WinForms { base.OnLoad(e); + glControl1_Resize(this, EventArgs.Empty); // Ensure the Viewport is set up correctly GL.ClearColor(Color.Crimson); } @@ -72,7 +73,7 @@ namespace Examples.WinForms glControl1.SwapBuffers(); } - private void glControl1_Resize(object sender, OpenTK.Platform.ResizeEventArgs e) + private void glControl1_Resize(object sender, EventArgs e) { if (glControl1.ClientSize.Height == 0) glControl1.ClientSize = new System.Drawing.Size(glControl1.ClientSize.Width, 1);