changing color of the part of label.text
How can i change color of just specific part of the label.text in visual basic 2010 express?
Dim b As Integer = 34
label.Text = "You have " & b.ToString & " new items"
for 开发者_运维问答example, i just want to change color of the "b" here.
or do i need to create a new label ?
Thanks
Assuming this is Windows Forms: you need to create a new label.
If it's WPF, you can do it by using a TextBlock with Run elements inside it, and setting the foreground of one of the Run elements.
精彩评论