This commit is contained in:
codeimp 2007-06-26 08:46:55 +00:00
parent 7d7cc2363d
commit 4f3b9f74eb
4 changed files with 11 additions and 19 deletions

View file

@ -25,18 +25,17 @@ using System.Windows.Forms;
#endregion
// This Form is a workaround for the slow drawing of the .NET Forms.
// By showing the Form at 0% Opacity it allows the .NET framework to complete
// drawing the Form first, then we set it to 100% Opacity to actually show it.
namespace CodeImp.DoomBuilder.Interface
{
public class DelayedForm : Form
{
#region ================== Variables
// Variables
private Timer formshowtimer;
#endregion
#region ================== Constructor
// Constructor
public DelayedForm()
{
@ -45,11 +44,7 @@ namespace CodeImp.DoomBuilder.Interface
formshowtimer.Interval = 1;
formshowtimer.Tick += new EventHandler(formshowtimer_Tick);
}
#endregion
#region ================== Methods
// When form is shown
protected override void OnShown(EventArgs e)
{
@ -61,7 +56,7 @@ namespace CodeImp.DoomBuilder.Interface
}
// When the form is to be shown
void formshowtimer_Tick(object sender, EventArgs e)
private void formshowtimer_Tick(object sender, EventArgs e)
{
// Get rid of the timer
formshowtimer.Dispose();
@ -70,7 +65,5 @@ namespace CodeImp.DoomBuilder.Interface
// Make the form visible
this.Opacity = 100;
}
#endregion
}
}

View file

@ -231,7 +231,6 @@ namespace CodeImp.DoomBuilder.Interface
this.KeyPreview = true;
this.MainMenuStrip = this.menumain;
this.Name = "MainForm";
this.Opacity = 0;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Doom Builder";
this.Resize += new System.EventHandler(this.MainForm_Resize);

View file

@ -28,7 +28,7 @@ using CodeImp.DoomBuilder.Controls;
namespace CodeImp.DoomBuilder.Interface
{
public partial class MainForm : DelayedForm
public partial class MainForm : Form
{
#region ================== Constants

View file

@ -123,12 +123,12 @@
<metadata name="menumain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>121, 17</value>
</metadata>
<metadata name="toolbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>