I am teaching myself VS from "Programming in Visual Basic 2010" by Julia C. Bradley & Anita C. Millspaugh. The textbook has a sample project that I coded to match the text. In the form MenuStrip execute, FontDialog1 and ColorDialog1 are used on the TextBoxes inside a GroupBox. When the color code is performed no color change occurs when executed. The Font change works as expected. I have successfully used the ColorDialog1 code before. I have confirmed the code is executed with a Debug break. Is there something in the properties for the GroupBox or TextBoxes that I have overlooked? TIA JP
Code:Public Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click With ColorDialog1 ' Change the color of the total labels. .Color = SubTotalTextBox.ForeColor .ShowDialog() SubTotalTextBox.ForeColor = .Color TaxTextBox.ForeColor = .Color TotalTextBox.ForeColor = .Color End With End Sub





Reply With Quote
