I have some code that takes a listbox and when select all / copy is done a string is created that is supposed to look like:
[quote]data, data, data, data, carriage_return+line_feed
data, data, data, data, carriage_return+line_feed
data, data, data, data, carriage_return+line_feed
data, data, data, data, carriage_return+line_feed
data, data, data, data, carriage_return+line_feed[/quote]
When I look at the string in the debugger the cr/lf pair look correct in binary 0D 0A, they look like question marks in a diamond in the text display of the string…
But when I paste it from the clipboard the recipient says it can’t paste the data.
[code]Function EditCopy() As Boolean
dim r,c as integer
dim cb as new Clipboard
dim line as string=""
dim lines as string=""
// Heading row
for c=0 to me.ColumnCount-1
if lines <> “” then lines = lines + “,”
lines = lines + me.Heading©
next
lines = lines + chr(&h0d) + chr(&h0a)
// rows
for r=0 to me.lastindex
if me.Selected® = true then
line = “”
for c=0 to me.ColumnCount-1
if line <> “” then line = line + “,”
line = line + me.Cell(r, c)
next
lines = lines + line + chr(&h0d) + chr(&h0a)
end if
next
// Copy to clip board
cb.Text=lines
cb.Close
System.DebugLog(“data copied to Clipboard”)
Return True
End Function
[/code]