0% found this document useful (0 votes)
55 views17 pages

Electro-Team: Interesting Education Visual Basic 2010

The document provides instructions for creating a color mixer application in Visual Basic 2010 using trackbars and labels to adjust and display RGB color values, where moving each trackbar updates the form background color based on the red, green, and blue component values.

Uploaded by

Mohamad Saad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views17 pages

Electro-Team: Interesting Education Visual Basic 2010

The document provides instructions for creating a color mixer application in Visual Basic 2010 using trackbars and labels to adjust and display RGB color values, where moving each trackbar updates the form background color based on the red, green, and blue component values.

Uploaded by

Mohamad Saad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Electro-Team

Interesting Education Visual Basic 2010

[email protected]

Color Mixer TrackBars

Visual Basic 2010

Open New Project

Add Toolbar Item


Track

Select Track Checkbox

From Toolbar\all Windows Forms

Add 3 TrackBars

Add 4 Labels And Fix Font Property

Fix Labels.Text Property

Declare Variables
Public Class Form1 Dim a As Integer Dim b As Integer Dim c As Integer

End Class

Set Trackbars Maximum Value


Private Sub Form1_Load TrackBar1.Maximum = 255 TrackBar2.Maximum = 255 TrackBar3.Maximum = 255

End Sub

Main Code
Private Sub TrackBar1_Scroll a = TrackBar1.Value b = TrackBar2.Value c = TrackBar3.Value

Me.BackColor = Color.FromArgb(a, b, c)
End Sub

Main Code
Private Sub TrackBar2_Scroll a = TrackBar1.Value b = TrackBar2.Value c = TrackBar3.Value

Me.BackColor = Color.FromArgb(a, b, c)
End Sub

Main Code
Private Sub TrackBar3_Scroll a = TrackBar1.Value b = TrackBar2.Value c = TrackBar3.Value

Me.BackColor = Color.FromArgb(a, b, c)
End Sub

Run Time

You might also like