zoukankan      html  css  js  c++  java
  • C# 技能鉴定 第三单元 Test3_4

    这个程序是用代码来改变字体的位置,其实也就是通过代码来改变label控件的位置的一个小程序。

    上代码:

     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.Threading.Tasks;
     9 using System.Windows.Forms;
    10 
    11 namespace Test3_4
    12 {
    13     public partial class Form1 : Form
    14     {
    15         public Form1()
    16         {
    17             InitializeComponent();
    18         }
    19 
    20         private void 左边LToolStripMenuItem_Click(object sender, EventArgs e)
    21         {
    22             this.label1.Left = 0;
    23             this.toolStripStatusLabel1.Text = "左边";
    24         }
    25 
    26         private void 中间MToolStripMenuItem_Click(object sender, EventArgs e)
    27         {
    28             this.label1.Left = 70;
    29             this.toolStripStatusLabel1.Text = "中间";
    30         }
    31 
    32         private void 右边RToolStripMenuItem_Click(object sender, EventArgs e)
    33         {
    34             this.label1.Left = 145;
    35             this.toolStripStatusLabel1.Text = "右边";
    36         }
    37 
    38         private void toolStripButton1_Click(object sender, EventArgs e)
    39         {
    40             this.label1.Left = 0;
    41             this.toolStripStatusLabel1.Text = "左边";
    42         }
    43 
    44         private void toolStripButton2_Click(object sender, EventArgs e)
    45         {
    46             this.label1.Left = 70;
    47             this.toolStripStatusLabel1.Text = "中间";
    48         }
    49 
    50         private void toolStripButton3_Click(object sender, EventArgs e)
    51         {
    52             this.label1.Left = 145;
    53             this.toolStripStatusLabel1.Text = "右边";
    54         }
    55     }
    56 }
  • 相关阅读:
    c++ vector容器的使用,序列倒叙reverse(),容器底部插入一个数值push_back()
    vs2015+opencv-3.2.0-vc14配置
    串的匹配算法--C语言实现
    顺序队列与链式队列--C语言实现
    链式栈-C语言实现
    顺序栈与两栈共享空间-C语言实现
    静态链表-C语言实现
    循环双向链表-C语言实现
    链表-C语言实现
    顺序表-C语言实现
  • 原文地址:https://www.cnblogs.com/chenpengzhou/p/7563232.html
Copyright © 2011-2022 走看看