现在的位置: 首页 > 综合 > 正文

Scroll控件

2013年03月07日 ⁄ 综合 ⁄ 共 553字 ⁄ 字号 评论关闭

每个scroll控件的

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ScrollDemo
{
public partial class Form1 : Form
{
Color backColor
= Color.Black;
public Form1()
{
InitializeComponent();
}
private void vsb_ValueChanged(object sender, EventArgs e)
{
int nR, nG, nB;
nR
= vsbRed.Value;
nG
= vsbGreen.Value;
nB
= vsbBlue.Value;
backColor
= Color.FromArgb(nR, nG, nB);
lbRed.Text
= nR.ToString();
lbGreen.Text
= nG.ToString();
lbBlue.Text
= nB.ToString();
btnShow.BackColor
= backColor;
Invalidate(
false);

}
}
}

抱歉!评论已关闭.