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

deKat's Avatar, Join Date: Mar 2010
Newbie Member
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 shabbir; 16Mar2010 at 10:17.. Reason: Code blocks
viv345 like this
viv345's Avatar, Join Date: Feb 2010
Contributor
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