Jump to content
  • Advertisement
Sign in to follow this  
Ancient Spirit

Basic C# Window Question...

This topic is 4652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I used the new Window Application wizard to get a project started. I add a method onLoad, so everytime that the window is loaded I want it to fade in using the opacity attribute, the thing is that the fade in causes the window to be black and then get to his normal view, thou fade out works fine, can anyone help? Thanks, Spirit.

Share this post


Link to post
Share on other sites
Advertisement

private void InitializeComponent() {
//
// Other Code, buttons and stuff, this method is called by the constructure
//

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 22);
this.Controls.Add(this.calculateButton);
this.Controls.Add(this.outputLabel);
this.Name = "Form1";
this.Text = "Calculations Thing";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}

private void Form1_Load(object sender, System.EventArgs e) {
for(double i=1.0; i>=0.0; i-=0.0005)
this.Opacity = i;
}


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!