//-->

Burak Tunšbilek

opacity

opacity işlemleri ile form ašılış kapanış efekti

Azalarak ašılan ve Kapanan Form

 

 

gerekenler:

1x buton

2x timer

Not: timer 1 ašılış išin timer 2 kapanış išin

 

kod:

 

private void button1_Click(object sender, EventArgs e)

        {

            timer2.Enabled = true;

        }

 

        private void timer1_Tick(object sender, EventArgs e)

        {

            if (this.Opacity < 1.0)  

            {

 

                this.Opacity += 0.1; 

 

            }

            else

            {

 

                timer1.Enabled = false;

 

            }

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            this.Opacity = 0.0;

            timer1.Enabled = true;

        }

 

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)

        {

           

        }

 

        private void timer2_Tick(object sender, EventArgs e)

        {

 

            if (this.Opacity > 0.0)  

            {

               this.Opacity -= 0.1;  //0.01 ile daha etkili oluyor o.1 = &1, 0.01 = &0.1 gibi oluyor

 

            }

 

            else

            {

 

                timer2.Enabled = false;

 

                Application.Exit();

 

            }

 

ABT Software

Tarih: 07 Ocak 2012 Cumartesi 7:21:55 PM 19:21