cygnus2112
New member
Hi,
for some reason when i choose to cancel a colour change the selected text still changes colour, and i think it shouldn't.
It'd be great if someone can tell me where im going wrong, heres my code
cheers!
for some reason when i choose to cancel a colour change the selected text still changes colour, and i think it shouldn't.
It'd be great if someone can tell me where im going wrong, heres my code
VB.NET:
Private Sub cmdForeColour_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdForeColour.Click
Dim col1 As Color
ColorDialog1.ShowDialog()
col1 = ColorDialog1.Color
If chkTextbox1.Checked Then
txtText1.ForeColor = col1
End If
If chkTextbox2.Checked Then
txtText2.ForeColor = col1
End If
End Sub
cheers!