Changing Text colour in text field by dropdown menu - Visual Studio 2008

Discussion in 'Visual Basic ( VB )' started by deKat, Mar 15, 2010.

  1. deKat

    deKat New Member

    Joined:
    Mar 15, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hey, i'm just doing some testing on Visual Studio 2008, what i'm trying to do is to change the text colour inside the multi-textfield which isn't working and I don't know why... PLEASE DON'T GO TOO ADVANCED! I just started using VB.

    Code:
     
    Public Class Form1 
    Dim ColourValue As Color 
     
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        rbBlue.Checked = False 
        rbRed.Checked = False     rbGreen.Checked = False 
    End Sub 
     
    Private Sub rbRed_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbRed.CheckedChanged 
        txtSpace.BackColor = Color.Red 
    End Sub 
     
    Private Sub rbBlue_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbBlue.CheckedChanged 
        txtSpace.BackColor = Color.Blue 
    End Sub 
     
    Private Sub rbGreen_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbGreen.CheckedChanged 
        txtSpace.BackColor = Color.Green 
    End Sub 
     
    Private Sub cbColours_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbColours.SelectedValueChanged 
     
        ColourValue = cbColours.SelectedValue 
        txtSpace.BackColor = ColourValue 
     
    End Sub 
    End Class 
    
    Basically i have the radio buttons that would change the background colour of the textfield, but i just need the dropdown menu to change the text colour.
    Many thanks :)

    Also, I want to try something like where a person’s name, age, gender and marital status are entered then when the submit button is clicked a series of statements are displayed depending on the data entered. I really don't know much to do this so, but any kind of help are always appreciated :)
     
    Last edited by a moderator: Mar 16, 2010
  2. viv345

    viv345 New Member

    Joined:
    Feb 22, 2010
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    0
    I am too a learner it was my imagination if 3dtext can be displayed in web pages then why not in forms through prgramming in VB6 or in 2008 Because web pages is also written as coding.
    Thanks I will try but i have vb6
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice