C#在窗体中设计滚动字幕的方法

  namespace _188

  {

  partial class Form1

  {

  ///

  /// Required designer variable.

  ///

  private System.ComponentModel.IContainer components = null;

  ///

  /// Clean up any resources being used.

  ///

  /// true if managed resources should be disposed; otherwise, false.

  protected override void Dispose(bool disposing)

  {

  if (disposing && (components != null))

  {

  components.Dispose();

  }

  base.Dispose(disposing);

  }

  #region Windows Form Designer generated code

  ///

  /// Required method for Designer support - do not modify

  /// the contents of this method with the code editor.

  ///

  private void InitializeComponent()

  {

  components = new System.ComponentModel.Container();

  button1 = new Button();

  button2 = new Button();

  button3 = new Button();

  timer1 = new System.Windows.Forms.Timer(components);

  label1 = new Label();

  SuspendLayout();

  //

  // button1

  //

  button1.Location = new Point(267, 73);

  button1.Name = "button1";

  button1.Size = new Size(75, 23);

  button1.TabIndex = 0;

  button1.Text = "演示";

  button1.UseVisualStyleBackColor = true;

  button1.Click += Button1_Click;

  //

  // button2

  //

  button2.Location = new Point(267, 102);

  button2.Name = "button2";

  button2.Size = new Size(75, 23);

  button2.TabIndex = 1;

  button2.Text = "停止";

  button2.UseVisualStyleBackColor = true;

  button2.Click += Button2_Click;

  //

  // button3

  //

  button3.Location = new Point(267, 131);

  button3.Name = "button3";

  button3.Size = new Size(75, 23);

  button3.TabIndex = 2;

  button3.Text = "关闭";

  button3.UseVisualStyleBackColor = true;

  button3.Click += Button3_Click;

  //

  // timer1

  //

  timer1.Tick += Timer1_Tick;

  //

  // label1

  //

  label1.AutoSize = true;

  label1.Font = new Font("Microsoft YaHei UI", 18F);

  label1.ForeColor = Color.Red;

  label1.Location = new Point(1, 221);

  label1.Name = "label1";

  label1.Size = new Size(470, 31);

  label1.TabIndex = 3;

  label1.Text = "好消息:本店让利大酬宾,所有商品八折。";

  //

  // Form1

  //

  AutoScaleDimensions = new SizeF(7F, 17F);

  AutoScaleMode = AutoScaleMode.Font;

  BackgroundImage = Properties.Resources._05;

  BackgroundImageLayout = ImageLayout.Stretch;

  ClientSize = new Size(354, 267);

  Controls.Add(label1);

  Controls.Add(button3);

  Controls.Add(button2);

  Controls.Add(button1);

  Name = "Form1";

  StartPosition = FormStartPosition.CenterScreen;

  Text = "窗体中滚动字幕";

  ResumeLayout(false);

  PerformLayout();

  }

  #endregion

  private Button button1;

  private Button button2;

  private Button button3;

  private System.Windows.Forms.Timer timer1;

  private Label label1;

  }

  }