zoukankan      html  css  js  c++  java
  • c#练习四单元总结

    test4-1

    在numericUpDown1中

     trackBar1.Value =(int) numericUpDown1.Value;

    在trackBar1中

    numericUpDown1.Value = trackBar1.Value;

    test4-2

    在红绿蓝按钮里执行语句

    this.BackColor = Color.FromArgb(hScrollBar1.Value, hScrollBar2.Value, hScrollBar3.Value);

    实现窗体背景颜色转变

    test4-3与test4-2类似

    test4-4

    this.ForeColor = Color.FromArgb(hScrollBar1.Value, hScrollBar2.Value, hScrollBar3.Value);

    实现窗体前景颜色的改变

    test4-5余test4-4类似

    test4-6

    在trackBar1中

    progressBar1.Value =trackBar1.Value ;
    this.Opacity = 0.5 + (double)trackBar1.Value / 100;

    实现窗体透明度的变化

    test4-7

    在combox1中实现

    switch(comboBox1.SelectedIndex)
    {
    case 0: radioButton1.Checked = true; break;
    case 1: radioButton2.Checked = true; break;
    case 2: radioButton3.Checked = true; break;
    }

    在radioButton1中

    if (radioButton1.Checked == true)
    comboBox1.SelectedIndex = 0;

    radioButton2与3中类似

    以此实现combox选择项与radiobutton的同步;

    test4-8类似于test4-7

    test4-9

    在checkBox1中

    if (checkBox1.Checked == true)
    listBox1.Items.Add("English");
    else
    listBox1.Items.Remove("English");

    在checkBox1与3中与checkbox1类似

    实现同过CheckBox复选向listbox添加或删除东西

    test4-10

    在domainUpDown1中

    listBox1.SelectedIndex = domainUpDown1.SelectedIndex;

    在listBox1中

    domainUpDown1.SelectedIndex = listBox1.SelectedIndex;

    实现同步

  • 相关阅读:
    Sigma Function
    优先队列
    Prime Permutation
    树状数组-----入门级别
    5.2Python函数(二)
    tkinter学习系列(四)之Button 控件
    tkinter学习系列(三)之Label控件
    tkinter学习系列(二)之窗口的设置
    tkinter学习系列(一)开篇之作
    5.1Python函数(一)
  • 原文地址:https://www.cnblogs.com/YuJiaJia/p/7589220.html
Copyright © 2011-2022 走看看