C#认证试题(3)

        private void 红ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Red;             toolStripStatusLabel1.Text = "红色";         }

        private void 绿ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Green;             toolStripStatusLabel1.Text = "绿色";         }

        private void 蓝ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Blue;             toolStripStatusLabel1.Text = "绿色";         }

        private void Form1_Load(object sender, EventArgs e)         {             this.ContextMenuStrip = this.contextMenuStrip1;         }

Test3-2

         private void 红色ToolStripMenuItem_Click(object sender, EventArgs e)         {             toolStripStatusLabel1.Text = "红色";             this.BackColor= Color.Red;                    }

        private void 绿色ToolStripMenuItem_Click(object sender, EventArgs e)         {             toolStripStatusLabel1.Text = "绿色";            this.BackColor= Color.Green;         }

        private void 蓝色ToolStripMenuItem_Click(object sender, EventArgs e)         {             toolStripStatusLabel1.Text = "蓝色";             this.BackColor = Color.Blue;         }

       private void toolStripButton1_Click(object sender, EventArgs e)         {             toolStripStatusLabel1.Text = "红色";             this.BackColor = Color.Red;     }

        private void toolStripButton2_Click(object sender, EventArgs e)         {

         toolStripStatusLabel1.Text = "绿色";             this.BackColor = Color.Green;         }

        private void toolStripButton3_Click(object sender, EventArgs e)         {

         toolStripStatusLabel1.Text = "蓝色";             this.BackColor = Color.Blue;

 

 Test3-3

 

        private void 黑ToolStripMenuItem_Click(object sender, EventArgs e)         {             this.ForeColor = Color.Red;             toolStripStatusLabel1.Text = "黑色";         }

        private void 白色ToolStripMenuItem_Click(object sender, EventArgs e)         {

            this.ForeColor = Color.Green;             toolStripStatusLabel1.Text = "白色";         }

        private void 紫色ToolStripMenuItem_Click(object sender, EventArgs e)         {

            this.ForeColor = Color.Blue;             toolStripStatusLabel1.Text = "紫色";         }

  Test3-4

 

        private void 左ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.Location = new Point(10, 100);             toolStripStatusLabel1.Text = "左";         }

        private void 中ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.Location = new Point(50, 100);             toolStripStatusLabel1.Text = "中";         }

        private void 右ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.Location = new Point(90, 100);             toolStripStatusLabel1.Text = "右";         }

        private void toolStripButton1_Click(object sender, EventArgs e)         {             label1.Location = new Point(10, 100);             toolStripStatusLabel1.Text = "左";         }

        private void toolStripButton2_Click(object sender, EventArgs e)         {             label1.Location = new Point(50, 100);             toolStripStatusLabel1.Text = "中";         }

        private void toolStripButton3_Click(object sender, EventArgs e)         {             label1.Location = new Point(90, 100);             toolStripStatusLabel1.Text = "右";         }

Test3-6

 

private void 红ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Red;             toolStripStatusLabel1.Text = "红色";     }

 private void 绿ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Green;             toolStripStatusLabel1.Text = "绿色";         }

  private void 蓝ToolStripMenuItem_Click(object sender, EventArgs e)         {             label1.BackColor = Color.Blue;             toolStripStatusLabel1.Text = "蓝色";   }

Test3-8

 

 private void toolStripButton1_Click(object sender, EventArgs e)         {             this.Cursor = Cursors.Default;             toolStripStatusLabel1.Text = "默认";         }

 private void toolStripButton2_Click(object sender, EventArgs e)         {             this.Cursor = Cursors.WaitCursor;             toolStripStatusLabel1.Text = "等待"; }

 private void toolStripButton3_Click(object sender, EventArgs e)         {             this.Cursor = Cursors.Cross;             toolStripStatusLabel1.Text = "十字";         }

 Test3-9

 

  private void toolStripButton1_Click(object sender, EventArgs e)         {             this.BackgroundImage = Image.FromFile("C:\\Pictures\\我的图片\\1651.jpg");     toolStripStatusLabel1.Text = "A";         }

private void toolStripButton2_Click(object sender, EventArgs e)         {             this.BackgroundImage = Image.FromFile("C:\\Users\\Pictures\\我的图片\\7.jpg");             toolStripStatusLabel1.Text = "B";         }

 private void toolStripButton3_Click(object sender, EventArgs e)         {             this.BackgroundImage = Image.FromFile("C:\\Users\\Pictures\\我的图片\\3.jpg");             toolStripStatusLabel1.Text = "C";

        }

 Test3-10

 

 private void toolStripButton2_Click(object sender, EventArgs e)         {             this.Icon = new Icon(@"D:\C#代码\C#认证题\认证题1\Test3_1\Tesr3-10\bin\Debug\logo\1.ico");             toolStripStatusLabel1.Text = "A";         }

        private void toolStripButton1_Click(object sender, EventArgs e)         {             this.Icon = new Icon(@"D:\C#代码\C#认证题\认证题1\Test3_1\Tesr3-10\bin\Debug\logo\2.ico");             toolStripStatusLabel1.Text = "B";         }

        private void toolStripButton3_Click(object sender, EventArgs e)         {             this.Icon = new Icon(@"D:\C#代码\C#认证题\认证题1\Test3_1\Tesr3-10\bin\Debug\logo\3.ico");             toolStripStatusLabel1.Text = "C";         }

  Test3-13

 

 private void 黑色ToolStripMenuItem_Click(object sender, EventArgs e)         {             this.ForeColor = Color.Red;             toolStripStatusLabel1.Text = "黑色";         }

        private void 白色ToolStripMenuItem_Click(object sender, EventArgs e)         {             this.ForeColor = Color.Green;             toolStripStatusLabel1.Text = "白色";

        }

        private void 紫色ToolStripMenuItem_Click(object sender, EventArgs e)         {             this.ForeColor = Color.Blue;             toolStripStatusLabel1.Text = "紫色";

        }

        private void Form1_Load(object sender, EventArgs e)         {             this.ContextMenuStrip = this.contextMenuStrip1;         }

 

posted @ 2017-10-14 15:43  此人不在  阅读(171)  评论(0编辑  收藏  举报