"JoelW" <js******@rockwellcollins.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Let's say you're programming in VB.NET, and you have:
Dim str1 As String
Dim str2 As String
Dim str3 As String
str1 = "I am red"
str2 = "I am yellow"
str3 = "I am dark green"
With TextBox1
.Text = str1 & ", " & str2 & ", " & str3
.SelectAll
.Copy
End With
...and you want to copy 'str' to the clipboard, with "I am red" in red
font, "I am yellow" in yellow font, and "I am dark green" in dark green
font?
I feel like I'm missing something obvious...
Thanks!
You are copying text to the clipboard. The clipboard does not contain
anything for colors. It has no UI to display colors/strings. All it cares
about is that you are copying "data" to the clipboard to be used at a later
time. What you are copying from may display the strings in colors. For
example, if you are copying from a Rich Text Box, then when you copy the
text, you are copying the format (the Rich Text format) as well as the text.
The "data" is the format code which contains the text you are copying.
Hope this helps :)
Mythran