It is not intuitively obvious how to do many things in .NET. One of these is the methodology for creating a colored brush after retreiving a color from the Color Dialog.
If you are writing code to print in .NET, you know that you have to develop the code to DrawString in order to print text. The following code is used in VB.NET to print some text.
| Dim b As New SolidBrush(Color.FromName(.Color)) e.Graphics.DrawString(printObject.Text, _ printFont, _ Color.Black, _ XPos, _ YPos, _ New StringFormat()) |
| Dim colorString As String = "Red" |
| Dim b As New SolidBrush(Color.FromName(ColorString)) e.Graphics.DrawString(printObject.Text, _ printFont, _ b, _ XPos, _ YPos, _ New StringFormat()) |