Form1.cs
上传用户:liupy888
上传日期:2022-08-10
资源大小:734k
文件大小:2k
源码类别:

C#编程

开发平台:

C#

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace Case01_3
  10. {
  11.     public partial class Form1 : Form
  12.     {
  13.         public Form1()
  14.         {
  15.             InitializeComponent();
  16.         }
  17.         private void button1_Click(object sender, EventArgs e)
  18.         {
  19.             Form2 myf = new Form2();
  20.             if (radioButton1.Checked == true)
  21.             {
  22.                 myf.Text = "自左向右滚动窗体动画效果";
  23.             }
  24.             else
  25.             {
  26.                 myf.Text = "自左向右滑动窗体动画效果";
  27.             }
  28.             myf.Show();
  29.         }
  30.         private void button2_Click(object sender, EventArgs e)
  31.         {
  32.             Form2 myf = new Form2();
  33.             if (radioButton1.Checked == true)
  34.             {
  35.                 myf.Text = "自右向左滚动窗体动画效果";
  36.             }
  37.             else
  38.             {
  39.                 myf.Text = "自右向左滑动窗体动画效果";
  40.             }
  41.             myf.Show();
  42.         }
  43.         private void button4_Click(object sender, EventArgs e)
  44.         {
  45.             Form2 myf = new Form2();
  46.             if (radioButton1.Checked == true)
  47.             {
  48.                 myf.Text = "自上向下滚动窗体动画效果";
  49.             }
  50.             else
  51.             {
  52.                 myf.Text = "自上向下滑动窗体动画效果";
  53.             }
  54.             myf.Show();
  55.         }
  56.         private void button3_Click(object sender, EventArgs e)
  57.         {
  58.             Form2 myf = new Form2();
  59.             if (radioButton1.Checked == true)
  60.             {
  61.                 myf.Text = "自下向上滚动窗体动画效果";
  62.             }
  63.             else
  64.             {
  65.                 myf.Text = "自下向上滑动窗体动画效果";
  66.             }
  67.             myf.Show();
  68.         }
  69.         private void button6_Click(object sender, EventArgs e)
  70.         {
  71.             Form2 myf = new Form2();
  72.             myf.Text = "向外扩展窗体动画效果";
  73.             myf.Show();
  74.         }
  75.         private void button5_Click(object sender, EventArgs e)
  76.         {
  77.             Form2 myf = new Form2();
  78.             myf.Text = "淡入窗体动画效果";
  79.             myf.Show();
  80.         }
  81.     }
  82. }