using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Runtime.InteropServices;using System.Linq;using System.Text;using System.Windows.Forms;namespace color_2_forms{ public partial class Form2 : Form { public Form2() { InitializeComponent(); } public void UpdateMe() { Form1 frm = new Form1(); frm.Show(); int R = trackBar1.Value; int G = trackBar2.Value; int B = trackBar3.Value; frm.BackColor = Color.FromArgb(R,G,B); textBox1.Text = " ( " + trackBar1.Value.ToString() + " , " + trackBar2.Value.ToString() +"," + trackBar3 .Value .ToString () + " ) "; } private void trackBar1_Scroll(object sender, EventArgs e) { Form1 frm = new Form1(); UpdateMe(); } private void trackBar2_Scroll(object sender, EventArgs e) { Form1 frm = new Form1(); UpdateMe(); } private void trackBar3_Scroll(object sender, EventArgs e) { Form1 frm = new Form1(); UpdateMe(); } }}
Attachment: color 2 forms.rar