Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Changing Text colour in text field by dropdown menu - Visual Studio 2008 (http://www.go4expert.com/forums/changing-text-colour-text-field-t21365/)

deKat 15Mar2010 17:18

Changing Text colour in text field by dropdown menu - Visual Studio 2008
 
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 :)

viv345 15Mar2010 19:59

Re: Changing Text colour in text field by dropdown menu - Visual Studio 2008
 
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


All times are GMT +5.5. The time now is 00:03.