When I set a TextBox to Readonly or set Enabled to false, the text color is gray. How can I force it to be the color specified in the ForeColor property of the TextBox.
Felix Wu gives this solution in the microsoft.public.dotnet.frameworks.windowsforms newgroup.
You can download a VB.NET sample.
Override the OnPaint event of the TextBox. For example:
Note: You need to set the ControlStyles to "UserPaint" in the constructor.