VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black

by Vivian Richards (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 17th February 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black

Rate Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black




'for first button label its  caption blue and type in

Private_Sub Command1_Click()
Text1.Text = vbBlue
End If 

'for second button label it's caption red and type in

Private_Sub Command1_Click()
Text1.Text = vbRed
End If 

'for third button label it's caption default and type in

Private_Sub Command1_Click()
Text1.Text = vbBlack
End If 

'run program type in the text box hello and click the buttons
'watch the text colour change

Download this snippet    Add to My Saved Code

Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black Comments

No comments have been posted about Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black. Why not be the first to post a comment about Make Text in a text box change colour using a text box and 3 buttons colours are Red/Blue and Black.

Post your comment

Subject:
Message:
0/1000 characters