.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Using track bar to chage the label text color

Posted By:laptop charles       Posted Date: July 15, 2010    Points: 10    Category: Visual Studio    URL: http://www.dotnetspark.com  

To change the text color.
 

It has used three track bar.
And one label with a text.
And then one method is coloring.
Set a color value.
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Gray
        Me.WindowState = FormWindowState.Maximized

    End Sub
    Sub coloring()
        Dim clr As Color = Color.FromArgb(r.Value, g.Value, b.Value)
        l.ForeColor = clr

    End Sub
   
   
    

    Private Sub g_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles g.Scroll
        coloring()
    End Sub

    Private Sub b_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b.Scroll
        coloring()
    End Sub

    Private Sub r_Scroll_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles r.Scroll
        coloring()
    End Sub


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend