zoukankan      html  css  js  c++  java
  • WinForm中Button的使用

    • 自定义样式
      • 先要清除系统风格影响:this.FlatStyle = FlatStyle.Flat;
        • FlatStyle.Flat
        • FlatStyle.System
        • FlatStyle.Standard
        • FlatStyle.Popup
      • 位置:this.Location = new System.Drawing.Point(this.sidePadding + this.btnWidth, 0);
      • 大小:this.Size = new System.Drawing.Size(btnWidth, btnHeight);
      • 前景色:this.ForeColor = Color.White;
      • 背景色(字体颜色):this.BackColor = Color.FromArgb(35, 135, 170);
      • 背景图片:this.BackgroundImage = newGradientBackImg;
      • 字体:this.Font = new Font(GlobalParams.SiemensFontFamily, GlobalParams.FontSize, FontStyle.Bold, GraphicsUnit.Pixel, 1);
      • 边框
        • 清除:this.FlatAppearance.BorderSize = 0;
        • 颜色:this.FlatAppearance.BorderColor = Color.FromArgb(173, 190, 203);
    • 事件/效果
      • 悬停时显示手形鼠标
        • this.btnTabCommonData.Click += new EventHandler(btnTabCommonData_Click);

          private void btn_MouseEnter(object sender, EventArgs e)
          {
          ((Button)sender).Cursor = Cursors.Hand;
          }

            
  • 相关阅读:
    c函数调用过程
    查找匹配行及前后5行
    指向类成员函数的指针
    C++箴言:理解typename的两个含义
    不定参数
    定时器
    unix编译
    sed
    大脑皮层的梦工厂
    静态链接库顺序问题
  • 原文地址:https://www.cnblogs.com/wyp1988/p/9844550.html
Copyright © 2011-2022 走看看