Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] TextBox Color Changer [Release]
#1
[Image: YzwzC.png]

Hey guys. Resistance is back and I will be staying here for a while, not like the other times.

Note: Not that much work is put into this applet...

Preview:
[Image: gg2wg.png]

Here is the download link:
Code:
http://www.mediafire.com/?5lvu79lw1xylnx8

Now I have created an nice little application as a challenge I suppose as an SF Coder, I assume we will have these annually released from time to time.





Source Code:
Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If ComboBox1.SelectedItem = "Red" Then
            Tc.ForeColor = Color.Red
        End If
        If ComboBox1.SelectedItem = "Dark Red" Then
            Tc.ForeColor = Color.DarkRed
        End If
        If ComboBox1.SelectedItem = "Blue" Then
            Tc.ForeColor = Color.Blue
        End If
        If ComboBox1.SelectedItem = "Dodger Blue" Then
            Tc.ForeColor = Color.DodgerBlue
        End If
        If ComboBox1.SelectedItem = "Yellow" Then
            Tc.ForeColor = Color.Yellow
        End If
        If ComboBox1.SelectedItem = "Muddy Yellow" Then
            Tc.ForeColor = Color.LightGoldenrodYellow
        End If
        If ComboBox1.SelectedItem = "Green" Then
            Tc.ForeColor = Color.Green
        End If
        If ComboBox1.SelectedItem = "Lime" Then
            Tc.ForeColor = Color.Lime
        End If
        If ComboBox1.SelectedItem = "White" Then
            Tc.ForeColor = Color.White
        End If
        If ComboBox1.SelectedItem = "Brown" Then
            Tc.ForeColor = Color.Brown
        End If
        If ComboBox1.SelectedItem = "Black" Then
            Tc.ForeColor = Color.Black
        End If
        If ComboBox1.SelectedItem = "Purple" Then
            Tc.ForeColor = Color.Purple
        End If
        If ComboBox1.SelectedItem = "Magenta" Then
            Tc.ForeColor = Color.Magenta
        End If
        If ComboBox1.SelectedItem = "Orange" Then
            Tc.ForeColor = Color.Orange
        End If
        If ComboBox1.SelectedItem = "Dark Orange" Then
            Tc.ForeColor = Color.DarkOrange
        End If
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
        Process.Start("http://www.supportforums.net/reputation.php?uid=4502")
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ComboBox1.Text = ""
        Tc.Text = "(Type Anything You Want)"
        Tc.ForeColor = Color.Black
    End Sub
End Class

[Image: t5BWm.png]
Reply
#2
Thanks for the release. I will have to download this and give it a look.
Reply
#3
Nice little project, so this changes the color of the textbox text? You know you can do that with a colordialogbox.
~ Digital-Punk
Reply
#4
(10-11-2011, 04:15 PM)Digital-Punk Wrote: Nice little project, so this changes the color of the textbox text? You know you can do that with a colordialogbox.
Yes it does, actually pretty cool.
Reply
#5
(10-11-2011, 04:15 PM)Digital-Punk Wrote: Nice little project, so this changes the color of the textbox text? You know you can do that with a colordialogbox.

Ehhh, I suppose so. I just wanted to get over it with. I wasn't thinking critically for a hardcore utility if you get what I mean. It still is something. I have a lot of work ahead of me right now; that program I made is a complete scrap to me, I can program much better than that.
[Image: t5BWm.png]
Reply
#6
(10-11-2011, 04:25 PM)Resistance Wrote: Ehhh, I suppose so. I just wanted to get over it with. I wasn't thinking critically for a hardcore utility if you get what I mean. It still is something. I have a lot of work ahead of me right now; that program I made is a complete scrap to me, I can program much better than that.

Lol, I see what your saying. I believe you could program better than that. It is a good project though. Nice share.
~ Digital-Punk
Reply
#7
Just a short little snippet, but still good.
Chase your dreams, and if it doesn't work, dream a new dream. -Louis “Coach” Presutti
Reply
#8
Not to thread steal, but here is a more efficient version. I couldn't get the auto color loads to work properly so I had to look up a source for it. Using lots of if statements isn't good and you can also use the select case method next time. Its a lot less code.

Code:
Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim Col As Color
        For Each f In System.Enum.GetNames(GetType(System.Drawing.KnownColor))
            Col = Color.FromName(f)
            If Col.IsSystemColor = False Then ComboBox1.Items.Add(Col)
        Next
        'Source for this http://www.vbdotnetforums.com/component-development/28782-color-combobox.html
    End Sub

    Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedValueChanged
        TextBox1.ForeColor = ComboBox1.SelectedItem
    End Sub
End Class
Reply
#9
(10-11-2011, 07:43 PM)RDCA Wrote: Not to thread steal, but here is a more efficient version. I couldn't get the auto color loads to work properly so I had to look up a source for it. Using lots of if statements isn't good and you can also use the select case method next time. Its a lot less code.

Code:
Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim Col As Color
        For Each f In System.Enum.GetNames(GetType(System.Drawing.KnownColor))
            Col = Color.FromName(f)
            If Col.IsSystemColor = False Then ComboBox1.Items.Add(Col)
        Next
        'Source for this http://www.vbdotnetforums.com/component-development/28782-color-combobox.html
    End Sub

    Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedValueChanged
        TextBox1.ForeColor = ComboBox1.SelectedItem
    End Sub
End Class

Yeah but not everyone knows the systems damn forcolors dude. Only us developers would know some besides the basics... Give some options jeez.

[Image: t5BWm.png]
Reply
#10
thankzz for sharing!!!!!! im newbie welcome me!!!!!!!!!!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Guidtech [Better then HWID][WITH VB FILES!] The-One 5 7,039 08-07-2015, 06:18 AM
Last Post: darknessxk
  [Release] Password Enhancer v1.0 [/Release] Resistance 11 5,895 09-29-2013, 08:58 PM
Last Post: Resistance
  [Release] Print Spooler Utility euverve 0 1,021 03-26-2013, 08:52 AM
Last Post: euverve
  [Release] USB Drive Defender euverve 0 1,317 03-22-2013, 06:21 AM
Last Post: euverve
  [VB.NET] Advance Icon Changer BlackSpider 17 9,818 11-25-2012, 10:41 PM
Last Post: ƃu∀ ıʞƃu∀

Forum Jump:


Users browsing this thread: 1 Guest(s)